//http://tb1.bdstatic.com/??/tb/_/picture_selector_1ef91ec.js,/tb/_/picture_web_selector_0035b16.js,/tb/_/picture_214d3ba.js,/tb/_/custom_emotion_24326d5.js,/tb/_/ueditor_emotion_ad18456.js,/tb/_/emotion_4add196.js,/tb/_/ueditor_video_28e14c1.js,/tb/_/video_1d31e34.js,/tb/_/sketchpad_0ea952f.js,/tb/_/scrawl_0005979.js,/tb/_/jquery_caret_a83afb9.js,/tb/_/ueditor_topic_e81e6a5.js,/tb/_/topic_09c6508.js,/tb/_/topic_suggestion_9bb3805.js,/tb/_/fullscreen_9b3dd34.js,/tb/_/height_limit_e4b1ffa.js,/tb/_/draft_91a3223.js,/tb/_/at_68fdde7.js,/tb/_/counter_d482e1c.js,/tb/_/word_limit_0f6ca1b.js,/tb/_/join_vip_dialog_9242ef7.js,/tb/_/props_data_2514f70.js,/tb/_/bubble_factory_279ffe5.js,/tb/_/post_setting_0ce6f36.js,/tb/_/setting_f184c24.js

_.Module.define({
	path: "ueditor/widget/picture_selector",
	sub: {
		layerHeight: 515,
		layerWidth: 810,
		initial: function(t) {
			this.options = t
		},
		genericNetPic: function(t) {
			var e = "",
				a = "net" + (new Date).getTime();
			return e += '<a href="javascript:void(0);" unselectable="on" class="complete i_item_con"  data-url="' + t + '" data-id="' + a + '" draggable="true"><img class="i_netitem_bg" ><span class="close" title="\u5220\u9664\u6b64\u56fe"></span><span class="error"></span></a>'
		},
		checkURL: function(t) {
			if(t = t.trim(), t.length <= 0) return !1;
			0 !== t.search(/http:\/\/|https:\/\//) && (t += "http://");
			var e = /(.gif|.jpg|.jpeg|.png)$/i;
			return !e.test(t) || t.getByteLength() > this.urlLength ? !1 : t
		},
		layerBottom: function() {
			var t = this,
				e = $('<div class="i_layer_bottom"></div>'),
				a = $('<a href="#" style="float:left;margin-right:10px;" class="btn_default btn_middle">\u786e \u5b9a</a>'),
				i = $(' <a href="#" style="float:left" class="btn_sub btn_middle">\u53d6 \u6d88</a>'),
				r = $('<div class="i_layer_btn"></div>');
			return r.append(a).append(i), e.append(r), e.width(this.layerWidth - 2), $.browser.msie && $.browser.version < 7 && e.css({
				bottom: 6
			}), a.click(function() {
				return t.submit(), t.lDialogOp.close(), !1
			}), i.click(function() {
				return t.lDialogOp.close(), !1
			}), e
		},
		getURLs: function(t, e, a) {
			for(var i, r = [], n = e.find(".i_item_con"), s = 0; s < n.length; s++)
				if(i = n.eq(s), "obj" == a) {
					var l = {};
					i.hasClass("complete") && i.tbattr("data-url") && (l.url = "1" == t && "" != i.tbattr("data-water-url") && "undefined" != i.tbattr("data-water-url") ? i.tbattr("data-water-url") : i.tbattr("data-url"), l.width = i.tbattr("data-width") || "", l.height = i.tbattr("data-height") || "", l.picType = 1, r.push(l))
				} else i.hasClass("complete") && i.tbattr("data-url") && ("1" == t && "" != i.tbattr("data-water-url") && "undefined" != i.tbattr("data-water-url") ? r.push(i.tbattr("data-water-url")) : r.push(i.tbattr("data-url")));
			return r
		},
		resetImg: function(t, e, a) {
			var i, r = t.width,
				n = t.height,
				s = 0,
				l = 0;
			r > e || n > a ? (i = r >= n ? e / r : e / n, l = (e - r * i) / 2, s = (a - n * i) / 2, $(t).css({
				height: n * i,
				width: r * i,
				top: s,
				left: l,
				visibility: "visible"
			})) : (l = (e - r) / 2, s = (a - n) / 2, $(t).css({
				top: s,
				left: l,
				visibility: "visible"
			}))
		},
		updateRemianImage: function(t, e, a) {
			var i = this,
				r = i.getRemainingNumber(t);
			this.$root.find(".j_image_num").html(r), 0 == r ? e && e() : a && a()
		},
		getRemainingNumber: function(t) {
			return this.options.maxLimit ? Math.max(0, this.options.maxLimit - this.getImageNum(t)) : Number.MAX_VALUE
		},
		getImageNum: function(t) {
			return t && t.find(".i_item_con").size() || 0
		}
	}
});
_.Module.define({
	path: "ueditor/widget/picture_web_selector",
	requires: ["tbui/widget/scroll_panel"],
	extend: "ueditor/widget/picture_selector",
	sub: {
		GET_ALBUM_URL: "/photo/interface/alblist",
		layerHeight: 460,
		layerWidth: 680,
		initial: function(e) {
			this.__super__(e), this.addPicList = {}, this.netPicLayer()
		},
		addPicList: {},
		netPicLayer: function() {
			var e = this,
				t = $("<div></div>");
			this.$root = t;
			var i = $('<div class="l_netpic_container"></div>'),
				n = '<div class="l_netpic_head clearfix"></div><div class="l_image_container"></div>';
			e.netContainer = i, i.html(n), t.append(i).append(e.layerBottom());
			var a = {
				html: t,
				title: "\u7f51\u7edc\u56fe\u7247",
				width: e.layerWidth,
				height: e.layerHeight,
				closeable: !0
			};
			e.lDialogOp = new $.dialog(a), e.lDialogOp.bind("onclose", function() {
				delete e.lDialogOp
			}), t.click(function(e) {
				return e.stopPropagation && e.stopPropagation(), !1
			}), $.browser.msie && $.browser.version < 7 && t.closest(".dialogJcontent").css({
				padding: "9px 0px 9px 9px;"
			}), e.lDialogOp.show(), e.renderInput(), e.renderPicCon()
		},
		renderInput: function() {
			var e = this.getRemainingNumber(this.netContainer),
				t = '<input type="text" value="\u7c98\u8d34\u56fe\u7247\u5730\u5740" class="l_netpic_input j_input form-control"  /><a href="#" style="float:left;" class="btn_default btn_middle j_addpic">\u6dfb \u52a0</a><span class="j_netpic_imagenum">\u8fd8\u53ef\u4ee5\u6dfb\u52a0<span class="j_image_num">' + e + "</span>\u5f20</span>",
				i = this,
				n = i.netContainer.find(".l_netpic_head");
			n.html(t), n.delegate(".j_addpic", "click", function() {
				if(0 == i.getRemainingNumber(i.netContainer)) return !1;
				var e = n.find(".j_input").val();
				return(e = i.checkURL(e)) ? (i.addImage(e), n.find(".j_input").val("\u7c98\u8d34\u56fe\u7247\u5730\u5740").css("color", "#ccc"), !1) : !1
			}), n.delegate(".j_input", "focus", function() {
				var e = $(this),
					t = e.val().trim();
				"\u7c98\u8d34\u56fe\u7247\u5730\u5740" == t && (e.val(""), e.css("color", "#000"))
			}), n.find(".j_input").focus(), n.delegate(".j_input", "blur", function() {
				var e = $(this),
					t = e.val().trim();
				"" == t && (e.val("\u7c98\u8d34\u56fe\u7247\u5730\u5740"), e.css("color", "#ccc"))
			})
		},
		addImage: function(e) {
			var t = this.genericNetPic(e),
				i = $(t),
				n = this,
				a = i.tbattr("data-id");
			$.browser.msie && $.browser.version < 8 ? this.netContainer.find(".l_image_container").append(i) : this.scrollPanel.appendContent(i), this.addPicList[a] = i, i.find("img.i_netitem_bg").load(function() {
				n.resetImg(this, 120, 120)
			}).tbattr("src", e), this.updateRemianImage(this.netContainer)
		},
		removeImage: function(e) {
			var t = this.netContainer.find(".l_image_container"),
				i = this;
			i.addPicList[e].remove(), delete i.addPicList[e], i.updateRemianImage(t)
		},
		renderPicCon: function() {
			var e = this.netContainer.find(".l_image_container"),
				t = this;
			$.browser.msie && $.browser.version < 8 || (t.scrollPanel = t.requireInstance("tbui/widget/scroll_panel", {
				container: e,
				height: 350,
				content: ""
			})), e.delegate(".close", "click", function() {
				var e = $(this).parent(),
					i = e.tbattr("data-id");
				t.removeImage(i)
			}), e.delegate(".i_item_con", "mouseover", function() {
				$(this).find(".close").show()
			}), e.delegate(".i_item_con", "mouseleave", function() {
				$(this).find(".close").hide()
			})
		},
		layerBottom: function(e) {
			var t = "",
				i = this,
				n = "upload" == e ? "\u63d2\u5165\u56fe\u7247" : "\u786e \u5b9a",
				a = $('<div class="i_layer_bottom"></div>'),
				s = $('<a href="#" style="float:left;margin-right:10px;" class="btn_default btn_middle">' + n + "</a>"),
				r = $(' <a href="#" style="float:left" class="btn_sub btn_middle">\u53d6 \u6d88</a>'),
				o = $('<div class="i_layer_btn"></div>');
			return o.append(s).append(r), a.append(o), "upload" == e && (t = '<div class="i_layer_water"><input class="i_checkbox" style="float:left;margin:3px 2px 0px 0px;;" checked type="checkbox" /><span style="float:left;">\u6dfb\u52a0\u672c\u5427\u6c34\u5370(gif\u683c\u5f0f\u6216\u8fc7\u5c0f\u7684\u56fe\u7247\u65e0\u6cd5\u6dfb\u52a0)</span></div>', a.append(t)), a.width(this.layerWidth - 2), $.browser.msie && $.browser.version < 7 && a.css({
				bottom: 6
			}), s.click(function() {
				return i.submit(), i.lDialogOp.close(), !1
			}), r.click(function(e) {
				try {
					i.lDialogOp.close()
				} catch(e) {
					alert(e.message)
				}
				return !1
			}), a
		},
		submit: function() {
			var e = this,
				t = e.getURLs(0, e.netContainer, "obj");
			this.trigger("ok", t)
		}
	}
});
_.Module.define({
	path: "ueditor/widget/picture",
	requires: ["ueditor/widget/picture_web_selector", "ueditor/widget/picture_uploader", "ueditor/widget/tb_gram"],
	sub: {
		initial: function(e, t, i) {
			e = e || window.UE, t = t || window.EditorUI, i = $.extend({}, i), this.props = i.props, this.initPlugin(e, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(e, t, this)
		},
		initPlugin: function(e) {
			e.plugins.tb_image = function() {
				function t(e) {
					for(var t, n = [], r = 0; t = e[r]; r++) t.url && n.push(i(t));
					return n.join("")
				}

				function i(e) {
					return e.width && e.width > o && (e.height = Math.floor(e.height / e.width * o), e.width = o), e.size = e.width && e.height ? 'width="' + e.width + '" height="' + e.height + '"' : 'onload="EditorUI.resizeImage(this, ' + o + ')"', e.ptype && (r = 103), e.picType = null != e.picType ? 'pic_type="' + e.picType + '"' : "", $.tb.format('<img class="BDE_Image" src="#{url}" unselectable="on" #{picType} #{size} /><br />', e)
				}
				var n = this,
					r = 0,
					a = 560,
					o = a;
				n.addListener("beforepaste", function(e, t) {
					var n = /<img[^>]*class="BDE_Colorful"[^>]*code="([\w\d]*)".*?(?:>|\/>)/gi;
					t.html = t.html.replace(n, function(e, t) {
						return String.fromCharCode(t)
					});
					var n = /(?:<img.*?>)|(?:<emb.*?>)|(?:http:\/\/((?:[a-zA-Z\d\-]+\.)+[a-zA-Z\d]+(?:\:[\d]{2,5})?)\/([^\s]+?)\.(jpg|jpeg|gif|png|bmp))/gi;
					t.html = t.html.replace(n, function(e) {
						return "<" == e.charAt(0) ? e : i({
							url: e,
							picType: 1
						})
					})
				}), n.addListener("resize", function(e, t) {
					n.$body.find(".BDE_Image").each(function(e, i) {
						EditorUI.resizeImage(i, t)
					}), o = t
				}), n.getImageNumber = function() {
					return $(n.body).find(".BDE_Image").size()
				}, n.commands.insertimage = {
					execCommand: function(e, i) {
						var r = t(i);
						n.execCommand("inserthtml", r, !0)
					}
				}, n.addOutputRule(function(e) {
					$.each(e.getNodesByTagName("img"), function(e, t) {
						t.setAttr("onload", ""), "_kf_formula_image" === t.getAttr("class") && (t.setAttr("class", "BDE_Image"), t.setAttr("pic_type", "1"), t.setAttr("data-source"));
						var i = t.getAttr("src");
						/^data:/.test(i) && t.parentNode.removeChild(t)
					})
				}, !0), n.addListener("aftergetcontent", function(t, i) {
					e.utils.each(i.getNodesByTagName("img"), function(e) {
						var t = /http:\/\/d.pcs.baidu.com\/thumbnail/;
						if("BDE_Image" == e.getAttr("class")) {
							var i = e.getAttr("src");
							t.test(i) && e.setAttr("src", i.replace(/&amp;/g, "&"))
						}
					})
				})
			}
		},
		initLayer: function(e, t) {
			e.registerLayer("image", function(e, i, n) {
				var r = ['<ul class="layer_btn_list clearfix">', n.tb_gram ? '<li class="from_tbgram"><a class="tbgram_container" href="javascript: void(0);"></a></li>' : "", '<li class="from_upload" ><a class="pic_upload_container" href="javascript: void(0);"></a><a href="#"></a></li>', '<li class="from_web"><a href="#"></a></li>', "</ul>"].join(""),
					a = '<div class="layer_text_tip">\u63d2\u5165\u56fe\u7247\u5df2\u8fbe\u4e0a\u9650\uff0c\u6700\u591a\u53ef\u63d2\u5165#{maxLimit}\u5f20~</div>',
					o = $.eduipopup().on("beforeshow", function() {
						var i = e.getValue("maxLimit") - e.getValue("imageNumber"),
							n = null;
						i > 0 ? (n = $(r), n.find(".from_web > a").click(function(n) {
							n.preventDefault();
							var r = t.requireInstance("ueditor/widget/picture_web_selector", {
								maxLimit: i
							});
							r.bind("ok", function(t, i) {
								e.trigger("insertimage", i)
							})
						})) : n = $($.tb.format(a, {
							maxLimit: e.getValue("maxLimit")
						}));
						var u = o.edui().getBodyContainer();
						u.html(""), u.append(n)
					}).on("aftershow", function() {
						var r = e.getValue("maxLimit") - e.getValue("imageNumber");
						if(r > 0) {
							var a = {
								uploadButtonContainer: o.edui().getBodyContainer().find(".pic_upload_container"),
								maxLimit: r,
								forumId: i.forum.id,
								props: t.props,
								tbs: i.tbs,
								save_yun_album: 1
							};
							e.getValue("dontSavePictureToYunAlbum") && (a.save_yun_album = 0);
							var u = t.requireInstance("ueditor/widget/picture_uploader", a);
							u.bind("ok", function(t, i) {
								e.trigger("insertimage", i)
							}), u.bind("open", function() {
								e.setValue("pictureUploaderOpen", !0)
							}), u.bind("close", function() {
								e.setValue("pictureUploaderOpen", !1), e.trigger("close")
							}), n.tb_gram && t.requireInstance("ueditor/widget/tb_gram", {
								container: o.edui().getBodyContainer().find(".tbgram_container"),
								maxLimit: 10,
								forumId: i.forum.id,
								props: i.user.props,
								tbs: i.tbs
							}, function(t) {
								t.bind("ok", function(t, i) {
									e.trigger("insertimage", i)
								}), t.bind("close", function() {
									e.trigger("close")
								}), e.bind("close", function() {
									t.destorySwf()
								})
							})
						}
					});
				return e.setWidget(o), o
			})
		},
		initModel: function(e) {
			e.registerModel("image", function(t, i) {
				var n = new e.EditorModel;
				e.bindLayer("image", n);
				var r = $.eduibutton({
					icon: "image",
					title: "\u63d2\u5165\u56fe\u7247"
				});
				return n.setButton(r), n.setValue("maxLimit", i.img_num), n
			})
		},
		initAdapter: function(e, t) {
			e.registerUI("image", function(e) {
				var i = this,
					n = t.getModel(e),
					r = n.getButton(),
					a = n.getWidget();
				return n.setValue("dontSavePictureToYunAlbum", this.options.dontSavePictureToYunAlbum), r.click(function() {
					n.setValue("imageNumber", i.getImageNumber()), a.parent().length || i.$container.find(".edui-dialog-container").append(a), a.css("zIndex", i.options.zIndex + 1).edui().show(r, {
						offsetTop: -10,
						caretLeft: 20,
						caretTop: -8
					}), $.stats.track("picture_btn", "ueditor")
				}), n.bind("insertimage", function(e, t) {
					i.execCommand("insertimage", t)
				}), n.bind("close", function() {
					a.hide()
				}), r.edui().register("click", r, function() {
					var e = n.getValue("pictureUploaderOpen");
					(null == e || 0 == e) && a.hide()
				}), r
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/custom_emotion",
	sub: {
		ORIGINAL_PIC_URL_PREFIX: "https://imgsa.baidu.com/forum/pic/item/",
		THUMBNAIL_PIC_URL_PREFIX: "https://imgsa.baidu.com/forum/abpic/item/",
		_template: ["<table class='t_emotion_add'>", "<tr>", "<th>\u63cf\u8ff0</th>", "<td><input type='text' name='title' class='form-control j_title'></td>", "</tr>", "<tr>", "<th>\u8868\u60c5\u56fe\u7247</th>", "<td><div style='position: relative'><button type='button' class='j_fake_button'>\u4e0a\u4f20</button><div class='upload_button_container j_upload_button'></div><span class='file_name j_file_name'></span></div><div class='j_preview'></div></td>", "</tr>", "<tr>", "<th></th>", '<td><a href="#" class="ui_btn ui_btn_s j_ok"><span><em>\u786e\u5b9a</em></span></a> ', '<a href="#" class="ui_btn ui_btn_s j_cancel"><span><em>\u53d6\u6d88</em></span></a></td>', "</tr>", "</table>"],
		initial: function() {},
		openDialog: function(t) {
			var e = this;
			this.$root = $(this._template.join("")), e.$previewContainer = e.$root.find(".j_preview");
			var o = e.$root.find(".j_fake_button");
			if(t.url) {
				var i = t.url,
					n = i.substring(i.lastIndexOf("/") + 1, i.lastIndexOf("."));
				e.updatePictureId(n), e.$previewContainer.prev().hide()
			}
			this.$root.find(".j_ok").click(function(t) {
				t.preventDefault(), t.stopPropagation();
				var o = e.$root.find(".j_title").val();
				null != e.original && null != e.thumbnail ? (e.addCustomEmotion({
					title: o,
					url: e.original,
					thumbnail: e.thumbnail
				}), e.trigger("ok"), a.close()) : alert("\u8bf7\u6dfb\u52a0\u56fe\u7247\u4f5c\u4e3a\u81ea\u5b9a\u4e49\u8868\u60c5\uff01")
			}), this.$root.find(".j_cancel").click(function(t) {
				t.preventDefault(), t.stopPropagation(), a.close()
			});
			var a = new $.dialog({
				title: "\u6dfb\u52a0\u81ea\u5b9a\u4e49\u8868\u60c5",
				width: 350,
				html: this.$root
			});
			a.show();
			var r = this.$root.find(".j_upload_button"),
				s = o.outerWidth(),
				u = o.outerHeight();
			r.css({
				width: s,
				height: u
			}), _.Module.use("common/widget/image_uploader_manager", {
				container: r,
				width: s,
				height: u,
				queueLen: 1,
				maxParallel: 1,
				fid: t.forumId
			}, function(t) {
				t.bind("onFileSelected", function(o, i) {
					var n = i.imageList[0];
					n && (r.next().html(n.name), e.$previewContainer.html("\u6b63\u5728\u4e0a\u4f20\uff0c\u8bf7\u7a0d\u5019..."), t.startUpload())
				}), t.bind("onComplete", function(t, o) {
					var i = o.imageList[0];
					if(i && i.response) {
						var n = i.response;
						0 == n.error_code && e.updatePictureId(n.info.pic_id_encode)
					}
				})
			})
		},
		updatePictureId: function(t) {
			this.thumbnail = this.THUMBNAIL_PIC_URL_PREFIX + t + ".jpg", this.original = this.ORIGINAL_PIC_URL_PREFIX + t + ".jpg", this.$previewContainer.html("<img src='" + this.thumbnail + "' />")
		},
		getCustomEmotions: function() {
			var t = $.tb.Storage.get("customEmotion");
			return t ? $.json.decode(t) : []
		},
		addCustomEmotion: function(t) {
			var e, o = $.tb.Storage.get("customEmotion");
			o ? (e = $.json.decode(o), e.push(t)) : e = [t], this.saveCustomEmotion(e)
		},
		removeCustomEmotion: function(t) {
			var e = $.tb.Storage.get("customEmotion");
			if(e) {
				for(var o, i = $.json.decode(e), n = null, a = 0; o = i[a]; a++)
					if(t === o.url) {
						n = a;
						break
					}
				null !== n && i.splice(n, 1), this.saveCustomEmotion(i)
			}
		},
		saveCustomEmotion: function(t) {
			var e = new Date;
			e.setFullYear(e.getFullYear() + 1), $.tb.Storage.set("customEmotion", $.json.encode(t), e)
		}
	}
});
_.Module.define({
	path: "ueditor/widget/ueditor_emotion",
	requires: ["tbui/widget/scroll_panel", "ueditor/widget/custom_emotion"],
	sub: {
		$container: null,
		_template: {
			inner: ['<div class="s_layer_content j_content ueditor_emotion_content"></div>', '<div  class="s_layer_tab j_tab ueditor_emotion_tab"></div>', '<div class="emotion_preview j_emotion_preview"></div>'].join(""),
			tab: '<div class="s_prev"></div><div class="s_tab_con_wrapper"><ul class="s_tab_content">#{content}</ul></div><div class="s_next"></div>',
			tabItem: '<li class="s_tab_btn #{isSelected}" data-index="#{index}" data-type="#{type}"><span class="s_tab_btnbg">#{name}</span></li>',
			table: '<table class="s_layer_table" cellpadding="1" cellspacing="1" align="center" style="border-collapse:collapse;" border="1" bordercolor="#e3e3e3">#{content}</table>',
			tr: "<tr>#{content}</tr>",
			td: '<td class="#{tdClassName} j_emotion" border="1" width="#{tdWidth}" height="#{tdHeight}" style="border-collapse:collapse;" data-value="#{index}" data-sname="#{groupName}" data-type="normal" data-class="#{tdClassName}" align="center"  bgcolor="#FFFFFF" data-stype="#{configType}" title="#{tip}" data-surl="#{url}" data-posflag="#{posflag}">#{content}</td>',
			tdEmpty: '<td width="#{edWidth}" height="#{tdHeight}" bgcolor="#FFFFFF"></td>',
			a: '<a class="img" href="javascript:void(0)" style="display:block;color:#000;font-size:14px;text-decoration:none;background-position:left #{offset}px;" >#{content}</a>'
		},
		path: "//tb2.bdstatic.com/tb/editor/images/",
		defaultGroup: "face",
		sequence: ["custom", "face", "ySmile", "bearchildren", "tiexing", "ali", "luoluobu", "qpx", "xyj", "lt", "bfmn", "zxh", "tsj", "wdj", "lxs", "baodong", "baodong_d", "bobo", "shadow", "ldw", "10th"],
		tableWidth: 540,
		count: 0,
		colsNum: 3,
		emotionConfig: {
			custom: {
				folder: "",
				name: "\u81ea\u5b9a\u4e49",
				css: {
					cols: 10,
					"class": "s_custom"
				},
				type: "custom",
				power: 0
			},
			face: {
				tip: ["\u5475\u5475", "\u54c8\u54c8", "\u5410\u820c", "\u554a", "\u9177", "\u6012", "\u5f00\u5fc3", "\u6c57", "\u6cea", "\u9ed1\u7ebf", "\u9119\u89c6", "\u4e0d\u9ad8\u5174", "\u771f\u68d2", "\u94b1", "\u7591\u95ee", "\u9634\u9669", "\u5410", "\u54a6", "\u59d4\u5c48", "\u82b1\u5fc3", "\u547c~", "\u7b11\u773c", "\u51b7", "\u592a\u5f00\u5fc3", "\u6ed1\u7a3d", "\u52c9\u5f3a", "\u72c2\u6c57", "\u4e56", "\u7761\u89c9", "\u60ca\u54ed", "\u5347\u8d77", "\u60ca\u8bb6", "\u55b7", "\u7231\u5fc3", "\u5fc3\u788e", "\u73ab\u7470", "\u793c\u7269", "\u5f69\u8679", "\u661f\u661f\u6708\u4eae", "\u592a\u9633", "\u94b1\u5e01", "\u706f\u6ce1", "\u8336\u676f", "\u86cb\u7cd5", "\u97f3\u4e50", "haha", "\u80dc\u5229", "\u5927\u62c7\u6307", "\u5f31", "OK", "\u4f24\u5fc3", "\u52a0\u6cb9", "\u5fc5\u80dc", "\u671f\u5f85", "\u725b\u903c", "\u80dc\u5229", "\u8ddf\u4e2b\u6b7b\u78d5", "\u8e22\u7403", "\u9762\u58c1", "\u9876", "\u5df4\u897f\u6012", "\u4f34\u821e", "\u5954\u8dd1", "\u70b9\u8d5e\u624b", "\u52a0\u6cb9", "\u54ed\u6ce3", "\u4eae\u7ea2\u724c", "\u7403\u8ff7", "\u8036", "\u8f6c\u5c41\u80a1"],
				num: 70,
				prev: "i_f",
				folder: "face/",
				suffix: "png",
				name: "\u9ed8\u8ba4",
				css: {
					cols: 10,
					"class": "s_face",
					width: 35,
					offset: 30
				},
				type: "img",
				power: 1
			},
			yxj: {
				tip: ["\u5b64\u72ec\u5bc2\u5bde\u51b7", "\u5149\u68cd\u5403\u6839\u6cb9\u6761", "\u53ef\u601c\u6ca1\u4eba\u7231", "\u53bbtmd\u5149\u68cd\u8282", "\u6765\u6361\u80a5\u7682\u554a", "\u7ed9\u8dea\u4e86", "\u60ca\u5446\u4e86", "\u62ff\u53bb\u64b8", "\u54e6\u5973\u795e", "\u697c\u4e3b\u597d\u4eba"],
				num: 10,
				prev: "yxj_0",
				folder: "yxj/",
				name: "\u75d2\u5c0f\u8d31",
				suffix: "gif",
				css: {
					cols: 10,
					"class": "s_yxj",
					width: 30,
					offset: 30
				},
				type: "img",
				power: 1
			},
			"10th": {
				tip: ["\u8e66\u8e66\u8df3\u8df3", "\u6643\u60a0", "\u6447\u6447\u6446\u6446", "\u5927\u6492\u82b1", "\u9ad8\u9ad8\u5174\u5174", "\u5f39\u5409\u4ed6", "\u9b54\u6cd5\u68d2", "\u625b\u5927\u65d7", "\u70b9\u8721\u70db", "\u5927\u79e7\u6b4c", "\u8d34\u5427\u5341\u5468\u5e74", "\u5341\u5468\u5e74"],
				num: 12,
				prev: "10th_0",
				folder: "10th/",
				name: "\u5341\u5468\u5e74",
				css: {
					cols: 10,
					"class": "s_tyears",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			ldw: {
				tip: ["\u4e00\u697c\u5582\u718a", "\u4fef\u5367\u6491", "\u6253\u9171\u6cb9", "\u56e7", "\u5927\u7b11", "\u7011\u5e03\u6c57~", "\u60ca\u8bb6", "\u81ed\u7f8e", "\u50bb\u7b11", "\u629b\u5a9a\u773c", "\u53d1\u6012", "\u6211\u9519\u4e86", "money", "\u6c14\u6124", "\u6311\u9017", "\u543b", "\u6012", "\u80dc\u5229", "\u59d4\u5c48", "\u53d7\u4f24", "\u8bf4\u5565\u5462\uff1f", "\u95ed\u5634", "\u4e0d", "\u9017\u4f60\u73a9\u513f", "\u98de\u543b", "\u7729\u6655", "\u9b54\u6cd5", "\u6211\u6765\u4e86", "\u7761\u4e86", "\u6211\u6253", "\u95ed\u5634", "\u6253", "\u6253\u6655\u4e86", "\u5237\u7259", "\u7206\u63cd", "\u70b8\u5f39", "\u5012\u7acb", "\u522e\u80e1\u5b50", "\u90aa\u6076\u7684\u7b11", "\u4e0d\u8981\u4e0d\u8981", "\u7231\u604b\u4e2d", "\u653e\u5927\u4ed4\u7ec6\u770b", "\u5077\u7aa5", "\u8d85\u9ad8\u5174", "\u6655", "\u677e\u53e3\u6c14", "\u6211\u8dd1", "\u4eab\u53d7", "\u4fee\u517b", "\u54ed", "\u6c57", "\u554a~", "\u70ed\u70c8\u6b22\u8fce"],
				num: 53,
				prev: "w_00",
				folder: "ldw/",
				suffix: "gif",
				name: "\u7eff\u8c46\u86d9",
				css: {
					cols: 10,
					"class": "s_ldw",
					width: 40,
					offset: 40
				},
				type: "img",
				power: 1
			},
			lxs: {
				tip: ["lxs\u4e0d\u60f3\u52a8", "lxs\u5403\u60ca", "lxs\u5439\u53e3\u54e8", "lxs\u6253\u6c14", "lxs\u6253\u5750", "lxs\u7b49\u5f85", "lxs\u6124\u6012", "lxs\u5e7b\u8c61", "lxs\u60ca\u559c", "lxs\u5f00\u5fc3", "lxs\u54ed\u557c", "lxs\u54ed\u7740\u8dd1", "lxs\u6ca1\u94b1", "lxs\u6015\u9b3c", "lxs\u629b\u5a9a\u773c", "lxs\u4e03\u5915", "lxs\u9a91\u9a6c\u821e", "lxs\u5347\u5929", "lxs\u77f3\u5316", "lxs\u6570\u94b1", "lxs\u5077\u5403", "lxs\u5077\u7b11", "lxs\u4e07\u5723\u8282", "lxs\u65e0\u804a", "lxs\u65e0\u5948", "lxs\u65e0\u8bed", "lxs\u59a9\u5a9a", "lxs\u6349\u6025", "lxs\u8f6c\u6655", "lxs\u649e\u8c46\u8150", "lxs\u8d58\u8089"],
				num: 31,
				prev: "lxs_0",
				folder: "lxs/",
				suffix: "gif",
				name: "\u51b7\u5148\u68ee",
				css: {
					cols: 10,
					"class": "s_lxs",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			xyj: {
				tip: ["\u75af\u5566", "\u62b1\u5934\u8dd1", "\u4e0d\u60f3\u7761", "\u4e0d\u8981\u5440", "\u82cd\u8747", "\u8e6d\u75d2", "\u5230\u7897\u91cc\u6765", "\u961f\u957f", "\u53d1\u8d22\u5566", "\u975e\u6d32\u821e", "\u9f13\u638c", "\u5e7f\u573a\u821e", "\u6eda\u7b52", "\u6a2a\u884c", "\u6325\u624b", "\u706b\u821e\u9e21", "\u5bc2\u5bde\u5440", "\u52a0\u6cb9", "\u6c5f\u5357style", "\u5a07\u7f9e", "\u60ca\u614c\u5931\u63aa", "\u7ea0\u7ed3", "\u5f00\u996d\u5566", "\u96f7\u795e", "\u6cea\u5954", "\u804aQQ", "\u9ea6\u9738", "\u732b\u5973", "\u9b54\u5492", "\u5c3f\u6025", "\u626d\u5c41\u80a1", "\u7011\u5e03\u6c57", "\u6c42\u9976", "\u6492\u5a07", "\u5c11\u5973", "\u6c34\u51b0\u9e21", "\u5929\u7136\u5446", "\u5410\u8840", "\u73a9\u624b\u673a", "\u5a01\u6b66", "\u4e94\u9053\u6760", "\u821e\u52a8", "\u6d17\u6d17", "\u54b8\u86cb\u9e21", "\u5411\u65e5\u8475", "\u9e2d\u5b50\u821e", "\u6e38\u6cf3", "\u62db\u8d22\u9e21", "\u7167\u955c\u5b50", "\u8718\u86db\u9e21"],
				num: 50,
				prev: "xyj_0",
				folder: "xyj/",
				suffix: "gif",
				name: "\u5c0f\u5e7a\u9e21",
				css: {
					cols: 10,
					"class": "s_xyj",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			ySmile: {
				tip: ["^_^", "(-__-)b", "\u2299\ufe4f\u2299\u2016", "\u2299\u25bd\u2299", " \u2267\u03b5 \u2266", "\u2533\uff3f\u2533", "(\u256c\u25bc\u76bf\u25bc\uff09", "\\(&quot;\u2594\u25a1\u2594)/", "\u2196(\uffe3\u25bd\uffe3&quot;) ", "(\u3065\uffe33\uffe3)\u3065 ", "(*\uffe3\u25bd\uffe3)y ", "o(\u2267\u53e3\u2266)o ", "(\uffe3\u03b5\uffe3*)", "/(\u3112o\u3112)/~~ ", "(\uffe3\u03b5\uffe3*)", "&lt;(\uffe3\ufe36\uffe3)&gt; ", "o(\u2267v\u2266)o", "\u256e(\u256f3\u2570)\u256d ", " \uff61\u25d5\u203f\u25d5\uff61", " \u7f52\u03c9\u7f52", "(\u25d5\u03c9\uff1c)\u2606 ", "(\u273f\u272a\u203f\u272a\uff61)\uff89 ", "\uff08\u25d5(\uff6a)\u25d5\uff09", "(\u25cf&#039;\u25e1&#039;\u25cf)\uff89\u2665", "\u03a3(\u3063 \xb0\u0414 \xb0;)\u3063", "\u311f( \u2594, \u2594 )\u310f", "\u51f8(\u8279\u76bf\u8279 ) ", "m(_ _)m", "(\u2299x\u2299;)", "( =\u2229\u03c9\u2229= )", " \u256e(\u256f\u25bd\u2570)\u256d", "(\u22673\u2266)/ ", "(\uff20_\uff20;)?", " o(*\uffe3\u25bd\uffe3*)\u30d6", "(o\u309c\u25bd\u309c)o\u2606", "&quot;o((&gt;\u03c9&lt; ))o&quot; "],
				num: 36,
				prev: "",
				folder: "",
				name: "\u989c\u8868\u60c5",
				css: {
					cols: 6,
					"class": "s_ySmile"
				},
				type: "text",
				power: 1
			},
			wdj: {
				tip: [],
				num: 24,
				prev: "wdj_",
				suffix: "png",
				folder: "wdj/",
				name: "\u8c4c\u8c46\u835a",
				css: {
					cols: 10,
					"class": "s_wdj",
					width: 30,
					offset: 30
				},
				type: "img",
				power: 1
			},
			ali: {
				tip: ["\u8d56\u76ae", "\u611f\u52a8", "\u60ca\u8bb6", "\u6012\u6c14", "\u54ed\u6ce3", "\u5403\u60ca", "\u5632\u5f04", "\u98d8\u8fc7", "\u8f6c\u5708\u54ed", "\u795e\u7ecf\u75c5", "\u63ea\u8033\u6735", "\u60ca\u6c57", "\u9690\u8eab", "\u4e0d\u8981", "\u9041", "\u4e0d\u516c\u5e73", "\u722c\u6765\u4e86", "\u86cb\u82b1\u54ed", "\u6e29\u6696", "\u70b9\u5934", "\u6492\u94b1", "\u732e\u82b1", "\u5bd2", "\u50bb\u7b11", "\u626d\u626d", "\u75af", "\u6293\u72c2", "\u6293", "\u8737", "\u6320\u5899", "\u72c2\u7b11", "\u62b1\u6795", "\u543c\u53eb", "\u56b7", "\u5520\u53e8", "\u634f\u8138", "\u72c2\u7b11", "\u90c1\u95f7", "\u6f5c\u6c34", "\u5f00\u5fc3", "\u51b7\u7b11\u8bdd", "\u9876", "\u6f5c", "\u753b\u5708\u5708", "\u73a9\u7535\u8111", "\u5410", "\u54ed\u7740\u8dd1", "\u963f\u72f8\u4fa0", "\u51b7\u6b7b\u4e86", "\u60c6\u6005~", "\u6478\u5934", "\u8e6d", "\u6253\u6eda", "\u53e9\u62dc", "\u6478", "\u6570\u94b1", "\u62d6\u8d70", "\u70ed", "\u52a01", "\u538b\u529b", "\u8868\u903c\u6211", "\u4eba\u5462", "\u6447\u6643", "\u6253\u5730\u9f20", "\u8fd9\u4e2a\u5c4c", "\u6050\u614c", "\u6655\u4e4e\u4e4e", "\u6d6e\u4e91", "\u7ed9\u529b", "\u676f\u5177\u4e86"],
				num: 70,
				prev: "ali_0",
				folder: "ali/",
				name: "\u963f\u72f8",
				css: {
					cols: 10,
					"class": "s_ali",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			luoluobu: {
				tip: ["hold\u4f4f", "\u963f\u95e8", "\u54ce\u54df", "\u5509\uff5e", "\u4e0d\u597d\u610f\u601d", "\u4e0d\u8981\u561b\uff01", "\u5531\u6b4c", "\u626f\u809a\u76ae", "\u626f\u8138", "\u6413\u8138", "\u6413\u624b", "\u6253\u706f\u7b3c", "\u6253\u8d77\u7cbe\u795e", "\u70b9\u5934", "\u70b9\u59342", "\u52a8\u52a8\u811a", "\u52a8\u52a8\u811a2", "\u6296\u811a", "\u6296\u811a2", "\u55ef\uff5e", "\u53d1\u5446", "\u9f13\u638c", "\u6eda\u684c\u5b50", "\u597d\u95f2\u963f\uff5e", "\u559d\u8336\u53d1\u5446", "\u54fc\uff01", "\u6643", "\u54ed", "\u56f0\u4e86", "\u6269\u80f8\u8fd0\u52a8", "\u6765\u6765\u6765", "\u6765\u561b\uff5e", "\u51b7\u9759\u51b7\u9759", "\u7f57\u7238\u7238\u626d\u626d", "\u7f57\u5988\u5988\u626d\u626d", "\u9e8b\u9e7f\u7f57\u7f57\u5e03", "\u626dpp", "\u626dpp2", "\u626d\u626d", "\u6b27\u4e5f", "\u8db4\u7740", "\u5207\uff01", "\u53bb\u53bb", "\u6492\u82b1", "\u4e0aWC", "\u5723\u8bde\u8001\u4eba", "\u5929\u4f7f\u7f57\u7f57\u5e03", "\u8df3\u5440\u8df3", "\u8df3\u5440\u8df32", "\u73a9\u4e2a\u7403", "\u6211\u6765\u4e86", "\u563b\u563b", "\u5411\u524d\u8fdb", "\u4e9a\u514b\u897f", "\u6447\u554a\u6447", "\u4e00\u8fb9\u5446\u7740\u53bb\uff01", "\u4e00\u8d77\u626d", "\u6709\u793c\u4e86", "\u8fd9\u53a2\u6709\u793c\u4e86", "\u8d70\u5440\u8d70"],
				num: 60,
				prev: "llb_0",
				folder: "luoluobu/",
				name: "\u7f57\u7f57\u5e03",
				css: {
					cols: 10,
					"class": "s_luoluobu",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			qpx: {
				tip: ["\u5fae\u7b11", "\u5e05\u54e5", "\u7f8e\u5973", "\u8001\u5927", "\u54c8\u54c8\u54c8", "\u5978\u7b11", "\u50bb\u4e50", "\u98de\u543b", "\u5bb3\u7f9e", "\u82b1\u75f4", "\u61a7\u61ac", "\u4f60\u725b", "\u9f13\u638c", "\u53ef\u7231", "\u59d4\u5c48", "\u5927\u54ed", "\u6cea\u5954", "\u5bfb\u6b7b", "\u60ca\u8bb6", "\u7591\u95ee", "\u9119\u89c6", "\u5927\u9a82", "\u72c2\u6012", "\u56e7", "\u6655", "\u5455\u5410", "\u8d22\u8ff7", "\u7761\u4e86", "\u601d\u8003", "\u6c57", "\u65e0\u8bed", "\u62dc", "\u97a0\u8eac", "\u7d2f\u4e86", "\u75c5\u4e86", "\u5899\u89d2", "\u8d85\u4eba", "\u6233", "\u8df3\u821e", "\u9b3c\u8138", "\u65e0\u804a", "\u649e\u5899", "\u9876", "HI", "\u996d", "\u86cb\u7cd5", "\u793c\u7269", "\u5fc3", "\u5fc3\u788e", "\u73ab\u7470", "\u70b8\u5f39", "\u96c6\u4f53\u821e", "\u6253\u4eba", "\u62cd\u62cd", "\u4eb2\u4eb2", "\u63e1\u624b", "\u5b89\u6170", "\u77f3\u5934", "\u526a\u5b50", "\u5e03", "\u606d\u559c\u5566", "\u5575\u5575"],
				num: 62,
				prev: "b",
				folder: "qpx_n/",
				name: "\u6c14\u6ce1\u718a",
				css: {
					cols: 10,
					"class": "s_qpx",
					width: 35,
					offset: 35
				},
				type: "img",
				power: 1
			},
			zxh: {
				tip: ["+1", "\u54c0\u4f24", "\u9971", "\u6fd2\u6b7b", "\u75c5", "\u5403\u8d27", "\u4e0d\u6ee1", "\u5446", "\u5012\u540a", "\u70b9\u5b50", "\u9876", "\u9f13\u638c", "\u5bb3\u7f9e", "\u6c57", "\u5475\u5475\u5475", "\u52a0\u6cb9", "\u5978\u7b11", "\u5978\u8bc8", "\u60ca\u8bb6", "\u56e7", "\u770b", "\u62a0\u9f3b\u5b50", "\u54ed", "\u56f0", "\u4e50", "\u6e9c\u8d70", "\u8def\u8fc7", "\u4e70\u4f60\u59b9\u7684\u623f\u7eb8", "\u6572\u9523", "\u4eb2\u543b", "\u53bb\u4f60\u59b9\u7684\u5de5\u4f5c", "\u6247\u98ce", "\u5931\u843d", "\u5237\u7259", "\u9003\u547d", "\u8df3\u821e", "\u542c\u97f3\u4e50", "\u5077\u7b11", "\u5410", "\u65e0\u8bed", "\u559c", "\u7b11", "\u5174\u594b", "\u9e2d\u5b50\u8df3", "\u54ac", "\u54ac", "\u793c\u7269", "\u8d5e", "\u9707\u60ca", "\u8ffd\u94b1", "\u505a\u9b3c\u8138"],
				num: 50,
				prev: "zxh_0",
				folder: "pczxh/",
				name: "\u5f20\u5c0f\u76d2",
				css: {
					cols: 10,
					"class": "s_zxh",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			tsj: {
				tip: ["Kiss", "Love", "Yeah", "\u554a\uff01", "\u80cc\u626d", "\u9876", "\u6296\u80f8", "88", "\u6c57", "\u778c\u7761", "\u9c81\u62c9", "\u62cd\u7816", "\u63c9\u8138", "\u751f\u65e5\u5feb\u4e50", "\u644a\u624b", "\u7761\u89c9", "\u762b\u5750", "\u65e0\u804a", "\u661f\u661f\u95ea", "\u65cb\u8f6c", "\u4e5f\u4e0d\u884c", "\u90c1\u95f7", "\u6b63Music", "\u6293\u5899", "\u649e\u5899\u81f3\u6b7b", "\u6b6a\u5934", "\u6233\u773c", "\u98d8\u8fc7", "\u4e92\u76f8\u62cd\u7816", "\u780d\u6b7b\u4f60", "\u6254\u684c\u5b50", "\u5c11\u6797\u5bfa", "\u4ec0\u4e48\uff1f", "\u8f6c\u5934", "\u6211\u7231\u725b\u5976", "\u6211\u8e22", "\u6447\u6643", "\u6655\u53a5", "\u5728\u7b3c\u5b50\u91cc", "\u9707\u8361"],
				num: 40,
				prev: "t_00",
				folder: "tsj/",
				name: "\u5154\u65af\u57fa",
				css: {
					cols: 10,
					"class": "s_tsj",
					width: 35,
					offset: 35
				},
				type: "img",
				power: 1
			},
			baodong: {
				tip: ["\u5fc3\u7167\u4e0d\u5ba3", "\u84dd\u8138", "\u56f0\u60d1", "\u591f\u62fd", "\u77aa\u773c", "\u85d0\u89c6", "\u601d\u8003", "\u5475\u5475", "\u60f3\u8981\u59b9\u5b50", "\u5e7b\u60f3", "\u65e0\u5948\u7684\u7b11", "\u4e3a\u4ec0\u4e48", "\u9ed1\u4eba\u6b6a\u5634", "\u6b6a\u5634\u7b11", "\u82e6\u903c", "\u9762\u762b", "\u54af\u54af\u54af", "\u751f\u6c14", "\u9ad8\u5174", "\u559c\u6781\u800c\u6ce3", "\u544a\u8bc9\u6211", "\u6709\u4e86", "\u597d\u5427", "\u5b64\u72ec\u4e00\u751f", "\u560e\u560e", "\u66b4\u8e81", "\u7d2b\u6b6a\u5634", "\u7ea2\u6b6a\u5634", "\u8fd9\u4e0d\u79d1\u5b66", "\u7b11\u800c\u4e0d\u8bed", "\u56f4\u89c2", "\u725b\u4ed4\u6b6a\u5634", "\u65b9\u8098\u5b50", "\u9707\u60ca", "\u60ca\u8bb6", "\u98a0\u8986\u4e09\u89c2", "\u5c3c\u7f8e\u85d0\u89c6", "\u5c3c\u7f8e\u5475\u5475", "\u5c3c\u7f8e\u53d1\u5446", "\u5c3c\u7f8e\u6709\u4e86", "\u732b\u5634\u7b11", "\u601d\u6625", "\u5c3c\u7f8e\u82e6\u903c", "\u7b11\u5c3f", "\u5c3c\u7f8e\u54af\u54af", "\u5c3c\u7f8e\u6b6a\u5634", "\u5c3c\u7f8e\u59da", "\u66b4\u8d70\u5c3c\u7f8e", "\u5a07\u7f9e", "\u5c3c\u7f8e\u9707\u60ca", "\u5b64\u72ec\u5c3c\u7f8e", "\u5c3c\u7f8e\u5927\u54ed", "\u5c3c\u7f8e\u6124\u6012", "\u5c3c\u7f8e\u560e\u560e", "\u5c3c\u7f8e\u6124\u61d1", "\u5c3c\u7f8e\u4e0d\u89e3"],
				num: 56,
				prev: "b_00",
				folder: "baodong/",
				name: "\u66b4\u6f2b\u9759\u6001",
				css: {
					cols: 10,
					"class": "s_baodong",
					width: 35,
					offset: 35
				},
				type: "img",
				power: 1
			},
			baodong_d: {
				tip: ["\u574f\u6deb", "\u6293\u72c2", "\u60b2\u621a", "\u75db\u54ed", "\u72af\u8d31", "\u5978\u7b11", "\u5c4c\u4e1d", "\u9ad8\u547c", "\u611f\u53f9", "\u611f\u52a8", "\u618b\u5c48", "\u8212\u723d", "\u574f\u7b11", "\u5c41\u98a0", "\u77b3\u672f", "\u6742\u800d", "\u59da\u8138", "\u5b64\u72ec", "\u66b4\u8d70", "\u6f47\u6d12", "\u5931\u671b", "\u540c\u684c", "\u53d8\u8138", "\u5f97\u745f", "\u8179\u9ed1\u7537", "\u8179\u9ed1\u5973", "\u591f\u62fd", "\u767d\u9886", "\u55b5\u5c3c\u739b", "\u6c6a\u5c3c\u739b", "\u563f\u563f\u5c3c\u739b", "\u52fe\u5f15", "\u53d1\u6cc4", "\u64cd\u64cd\u64cd"],
				num: 34,
				prev: "bd_00",
				folder: "baodong_d/",
				name: "\u66b4\u6f2b\u52a8\u6001",
				css: {
					cols: 10,
					"class": "s_baodong_d",
					width: 35,
					offset: 35
				},
				type: "img",
				power: 1
			},
			bobo: {
				tip: ["HI", "KISS", "\u4e0d\u8bf4", "\u4e0d\u8981", "\u626f\u82b1", "\u5927\u5fc3", "\u9876", "\u5927\u60ca", "\u98de\u543b", "\u9b3c\u8138", "\u5bb3\u7f9e", "\u53e3\u6c34", "\u72c2\u54ed", "\u6765", "\u6cea\u773c", "\u6d41\u6cea", "\u751f\u6c14", "\u5410\u820c", "\u559c\u6b22", "\u65cb\u8f6c", "\u518d\u89c1", "\u6293\u72c2", "\u6c57", "\u9119\u89c6", "\u62dc", "\u5410\u8840", "\u5618", "\u6253\u4eba", "\u8e66\u8df3", "\u53d8\u8138", "\u626f\u8089", "\u5403To", "\u5403\u82b1", "\u5439\u6ce1\u6ce1\u7cd6", "\u5927\u53d8\u8eab", "\u98de\u5929\u821e", "\u56de\u7738", "\u53ef\u601c", "\u731b\u62bd", "\u6ce1\u6ce1", "\u82f9\u679c", "\u4eb2", "", "\u9a9a\u821e", "\u70e7\u9999", "\u7761", "\u5957\u5a03\u5a03", "\u6345\u6345", "\u821e\u5012", "\u897f\u7ea2\u67ff", "\u7231\u6155", "\u6447", "\u6447\u6446", "\u6742\u800d", "\u62db\u8d22", "\u88ab\u6bb4", "\u88ab\u7403\u95f7", "\u5927\u60ca", "\u7406\u60f3", "\u6b27\u6253", "\u5455\u5410", "\u788e", "\u5410\u75f0"],
				num: 63,
				prev: "B_00",
				folder: "bobo/",
				name: "\u6ce2\u6ce2",
				css: {
					cols: 10,
					"class": "s_bobo",
					width: 35,
					offset: 35
				},
				type: "img",
				power: 1
			},
			shadow: {
				tip: ["\u7126\u7cd6\u821e", "\u7ffb\u6eda", "\u62cd\u5c41\u80a1\u505a\u9b3c\u8138", "\u4e0d", "\u6cb3\u87f9\u6389\u5566", "\u54e6\u8036", "\u6211\u5012", "\u6295\u964d", "\u542c\u97f3\u4e50", "\u88ab\u7838", "\u5410\u820c\u5934", "\u592a\u597d\u5566", "\u8d22\u6e90\u6eda\u6eda", "\u4eba\u5462", "\u6325\u624b\u5e15", "\u5077\u7b11", "\u5377\u88ab", "\u770b\u697c\u4e0a", "\u6211\u62bd", "\u6709\u6728\u6709", "\u54ed", "\u6b22\u547c", "\u50bb\u516e\u516e", "\u6247\u6247\u5b50", "\u62cd\u624b", "\u7d27\u5f20", "\u6d17\u6fa1", "\u8036", "\u5403\u897f\u74dc", "\u7eb3\u5c3c", "\u6ca1\u6709\u94b1", "\u62ff\u73a9\u5076", "\u6765\u770b\u770b", "\u54c7\u54c7\u53eb", "\u62db\u8d22\u732b", "\u653e\u5c41", "\u9686\u91cd\u4ecb\u7ecd", "\u6c42\u4f60\u4e86", "\u649e\u73bb\u7483", "\u773a\u671b", "\u6492\u82b1", "\u73a9\u94c3\u94db", "\u601d\u8003\u8005", "\u62bd\u98ce", "\u5403\u82f9\u679c", "\u5149\u68cd"],
				num: 46,
				prev: "yz_0",
				folder: "shadow/",
				name: "\u5f71\u5b50",
				css: {
					cols: 10,
					"class": "s_shadow",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			lt: {
				tip: ["\u4e2d\u7bad", "LS\u53bb\u6b7b", "LS\u53bb\u6b7b\u5b50\u5f39", "LS\u53bb\u6b7b\u589e\u5f3a", "LS\u53bb\u6b7b\u70ae\u5f39", "\u677f\u51f3", "\u4e0d\u723d", "\u4e0d\u8981", "\u8d85\u4eba", "\u5403\u96f6\u98df", "\u62bd\u70df", "\u4e32", "\u6253\u72d7", "\u6253\u9171\u6cb9", "\u6253\u4f60", "\u6234\u58a8\u955c", "\u86cb", "\u8361\u6f3e", "\u9876\u7834\u697c\u4e0a", "\u53d1\u61f5", "\u653e\u5c41", "\u8d1f\u5206\u6eda\u7c97", "\u559d\u5927\u4e86", "\u547c\u5566\u5708\u513f", "\u62a4", "\u6ed1\u51b0", "\u753b\u5708\u5708", "\u706b\u94b3\u5218", "\u8d31\u8d31\u7684", "\u60ca\u5413", "\u62a0\u811a", "lt\u54ed", "\u62c9\u7c91\u7c91", "\u64b8", "\u6320PP", "\u95f9", "\u6392\u7403", "\u524d\u6392", "\u6572\u624b\u9f13", "\u6c99\u53d1", "\u5254\u7259", "\u5154\u5b50\u8e66\u8d77\u6765", "\u6316\u9f3b\u5c4e", "\u65e0\u8bed", "\u778e\u4e86", "\u79c0\u808c\u8089", "\u6447\u6eda", "\u610f\u5916\u60ca\u559c", "\u9707\u60ca", "\u6b63\u6b65"],
				num: 50,
				prev: "ltn_0",
				folder: "lt/",
				name: "\u51b7\u5154",
				css: {
					cols: 10,
					"class": "s_lt",
					width: 42,
					offset: 42
				},
				type: "img",
				power: 1
			},
			bfmn: {
				tip: ["\u7231\u4f60", "\u50b2\u5a07", "\u6253\u4f60", "\u5e26\u56de\u53bb\u538b\u5be8", "\u7ed9\u8138\u4e0d\u8981\u8138", "\u6eda\uff08\u767e\u5ea6\u72ec\u5bb6\uff09", "\u6eda", "\u597d\u559c\u6b22", "\u6cea\u5954", "\u5973\u5c4c\u4e1d", "\u6df1\u4e95\u51b0", "\u7b97\u4f60\u72e0", "\u6211\u7f8e", "\u867e\u7c73", "\u4e0d\u8981", "\u597d\u5d07\u62dc", "\u6cea\u5954", "\u4f60\u59b9\u554a", "\u4f60\u9020\u4e48", "\u6c42\u4ea4\u5f80", "\u9a9a\u5e74", "\u571f\u8c6a\u505a\u670b\u53cb\uff08\u767e\u5ea6\u72ec\u5bb6\uff09", "\u56f4\u89c2", "\u65e0\u836f\u53ef\u533b", "\u518d\u89c1", "\u5728\u4e48", "call-me", "no-zuo-no-die"],
				num: 28,
				prev: "bfmn_0",
				folder: "bfmn/",
				name: "\u767d\u53d1\u9b54\u5973",
				css: {
					cols: 10,
					"class": "s_bfmn",
					width: 40,
					offset: 41
				},
				type: "img",
				power: 1
			},
			bearchildren: {
				tip: ["88", "HI", "\u4eba\u8270\u4e0d\u62c6", "\u5565", "\u5927\u54ed", "\u5931\u843d", "\u6012\u8d5e", "\u60ca\u5446\u4e86", "\u674e\u83ca\u798f", "\u6765\u4fe1\u780d", "\u6b22\u8fce\u5165\u7fa4", "\u725b\u95ea\u95ea", "\u751f\u65e5\u5feb\u4e50", "\u77f3\u5316", "\u7f9e\u7f9e\u54d2", "\u80a5\u7682\u5fc5\u6740", "\u8c22\u8c22\u4f60", "\u8df3\u821e", "\u9739\u96f3\u821e", "\u9f13\u638c", "\u5077\u5185\u88e4", "\u54e6\u8036", "\u54ed", "\u559c\u6b22", "\u597d\u68d2", "\u6454", "\u6c42\u7b7e\u540d", "\u83ca\u82b1", "\u5c41", "\u54ed", "\u9876", "+1", "biu", "\u4eb2\u4eb2", "\u97ad\u5211", "\u80e1\u5b50", "\u50f5\u5c38", "\u6349\u6025", "\u626d\u626d", "\u63d2\u697c\u4e0a", "\u559c\u6b22", "\u8dea\u6c42", "\u7f9e\u7f9e", "\u62a0\u9f3b\u5b50", "\u4f11\u606f\u4e00\u4e0b", "\u5df2\u6b7b", "\u5fd9\u7740\u5462", "\u6c57", "\u6da8\u59ff\u52bf", "\u7cca\u4f60\u718a\u8138", "\u8c1c\u56e2", "\u98de\u543b", "love", "\u54e6\u8036", "\u54ed", "\u5d29\u6e83", "\u561a\u745f", "\u65ad\u7f51", "\u6d17\u6fa1", "\u8d2d\u7269"],
				num: 60,
				prev: "bearchildren_",
				folder: "bearchildren/",
				name: "\u718a\u5b69\u5b50",
				css: {
					cols: 10,
					"class": "s_bearchildren",
					width: 40,
					offset: 40
				},
				type: "img",
				power: 1
			},
			tiexing: {
				tip: ["ILOVEU", "\u4e0a\u73ed\u4e2d", "\u4e0d\u8981\u561b", "\u4e2d\u7bad", "\u4ef0\u5367\u8d77\u5750", "\u4f53\u64cd", "\u54c8\u54c8", "\u54ed", "\u597d\u57fa\u53cb", "\u5bc2\u5bde", "\u561a\u745f", "\u60ca\u5446\u4e86", "\u6311\u8845", "\u6413\u6fa1", "\u649e\u5934", "\u65e0\u804a", "\u6d17\u6fa1", "\u6d17\u8863\u670d", "\u70b9\u624b\u6307", "\u725b\u903c", "\u73a9\u6c34\u679c", "\u751f\u75c5", "\u76ae\u97ad\u4f3a\u5019", "\u7761\u89c9", "\u793a\u7231", "\u7ed9\u8dea\u4e86", "\u80dc\u5229", "\u8ba8\u538c", "\u8ddf\u4e2b\u6b7b\u78d5", "\u8e22\u7403", "\u8eba\u67aa", "\u9001\u7eb8", "\u9003\u8dd1", "\u9876", "\u9a6c\u8428\u5409", "\u4e0d\u670d", "\u4eb2\u543b", "\u4f24\u5fc3", "\u5207\u514b\u95f9", "\u52a0\u6cb9", "\u52fe\u5f15", "\u5343\u5e74\u6740", "\u53bbtmd", "\u53d1\u6296", "\u5403", "\u547c\u54c8", "\u54ed", "\u5931\u843d", "\u5b64\u72ec", "\u5e86\u795d", "\u561a\u745f", "\u5fc5\u80dc", "\u60ca", "\u62bd", "\u62bd\u4e2b\u7684", "\u6311\u8845", "\u6361\u80a5\u7682", "\u6492\u82b1", "\u649e\u5899", "\u671f\u5f85", "\u677f\u51f3", "\u72af\u8d31", "\u7b11", "\u8def\u8fc7", "\u9119\u89c6", "\u9762\u58c1", "\u9876", "\u9876\u697c\u4e0a", "\u9c81", "\u9f13\u638c"],
				num: 70,
				prev: "tiexing_",
				folder: "tiexing/",
				name: "\u75d2\u5c0f\u8d31",
				css: {
					cols: 10,
					"class": "s_tiexing",
					width: 40,
					offset: 40
				},
				type: "img",
				power: 1
			}
		},
		initial: function(t) {
			var e = this,
				s = t.container;
			t.customEmotionEnable && (this.emotionConfig.custom.power = 1, this.defaultGroup = "custom"), this.$container = s, this.defaultGroup = t.defaultGroup || e.defaultGroup, s.html(this._template.inner), this.$content = s.find(".j_content"), this.$tab = s.find(".j_tab"), e.scrollPanel = e.requireInstance("tbui/widget/scroll_panel", {
				container: e.$content,
				height: 277,
				content: ""
			}), t.customEmotionEnable && (this.customEmotion = this.requireInstance("ueditor/widget/custom_emotion"), this.customEmotion.bind("ok", function() {
				e.scrollPanel.$content.html(e.generateCustomTable())
			})), e.generateTabList(), e.switchTab(e.defaultGroup), e.initEvent()
		},
		initEvent: function() {
			this.$container;
			this.initEmotionEvent(), this.initTabEvent()
		},
		initEmotionEvent: function() {
			var t = this,
				e = this.getMouseenterHandler(this);
			this.$content.on("mouseleave", ".j_emotion, .j_custom_emotion", function() {
				$(this).css("background-color", "#ffffff"), $(".j_emotion_preview").hide().removeClass("emotion_preview_show")
			}), this.$content.on("mouseenter", ".j_emotion, .j_custom_emotion", function() {
				e.call(this)
			}), this.$content.on("click", ".j_emotion", function() {
				var e = $(this),
					s = {
						url: e.data("surl"),
						type: e.data("stype"),
						title: e.tbattr("title")
					};
				"text" == e.data("stype") ? $.stats.sendRequest("ev_type=click&st_mod=editor&st_type=text&st_value=" + e.tbattr("title")) : t.sendStats(e, "click"), t.trigger("insertemotion", s)
			}).on("click", ".j_custom_emotion", function(e) {
				var s = $(e.target);
				if(s.hasClass("j_delete")) {
					if(confirm("\u786e\u8ba4\u8981\u5220\u9664\u6b64\u8868\u60c5\u5417\uff1f")) {
						var o = s.parent().data("surl");
						t.customEmotion.removeCustomEmotion(o), t.scrollPanel.$content.html(t.generateCustomTable())
					}
				} else t.trigger("insertemotion", {
					url: $(this).data("surl"),
					type: "custom"
				})
			}).on("click", ".j_add_emotion", function() {
				t.customEmotion.openDialog({
					forumId: PosterContext.getContext().forum.id
				})
			})
		},
		initTabEvent: function() {
			var t = this;
			this.$tab.on("click", ".s_prev", function() {
				t.prevTab()
			}).on("click", ".s_next", function() {
				t.nextTab()
			}).on("click", "li", function() {
				var e = $(this).data("type");
				e && t.switchTab(e)
			}).on("mouseenter", ".s_tab_btn", function() {
				$(this).addClass("s_hover")
			}).on("mouseleave", ".s_tab_btn", function() {
				$(this).removeClass("s_hover")
			})
		},
		sendStats: function(t, e) {
			var s = t.data("value"),
				o = t.data("sname"),
				i = [40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60];
			try {
				o && "10th" == o && $.stats.track(s, "PC\u7aef\u5341\u5468\u5e74\u53d1\u5e16\u8868\u60c5\u70b9\u51fb\u7edf\u8ba1"), -1 != $.inArray(s, i) ? $.stats.sendRequest("st_all=doubleeleven&ev_type=" + e + "&st_mod=editor&st_type=" + o + "&st_value=" + s) : $.stats.sendRequest("ev_type=" + e + "&st_mod=editor&st_type=" + o + "&st_value=" + s)
			} catch(n) {}
		},
		getMouseenterHandler: function() {
			function t() {
				var t = e.width(),
					s = e.height();
				(t > 60 || s > 60) && (t > s ? (e.width(60), e.height(60 * (s / t))) : (e.height(60), e.width(60 * (t / s))));
				var o = (60 - e.width()) / 2,
					i = (60 - e.height()) / 2;
				e.css({
					left: o,
					top: i
				})
			}
			var e = null,
				s = null;
			return function() {
				var o = $(this),
					i = $(".j_emotion_preview");
				e && e.remove(), o.css("background-color", "#e8e8fd"), "text" !== o.data("stype") && (e = $("<img/>"), e.addClass("review"), e.load(function() {
					clearTimeout(s), i.show();
					var n = e.width(),
						a = e.height();
					0 == n || 0 == a ? s = setTimeout(arguments.callee, 50) : (t(), 1 == o.data("posflag") && i.addClass("emotion_preview_show"))
				}).error(function() {
					s = setTimeout(function() {
						e.tbattr("src", o.data("surl"))
					}, 50)
				}).tbattr("src", o.data("surl")), i.append(e))
			}
		},
		getEmotionFileName: function(t, e, s) {
			return "i_f" == t && e >= 51 && (s = "gif"), t + (10 > e ? "0" : "") + e + "." + s
		},
		generateEmotions: function(t) {
			var e = this,
				s = this.scrollPanel,
				o = this.emotionConfig,
				i = o[t],
				n = this.path,
				a = n + i.folder,
				l = i.css.cols,
				r = l / 2,
				c = this.tableWidth / l,
				d = c;
			"text" == i.type && (d /= 2);
			var m, u = i.css["class"],
				p = i.css.offset,
				f = i.suffix || "gif",
				h = i.prev,
				_ = this._template.table,
				b = this._template.tr,
				g = this._template.tdEmpty,
				v = this._template.td,
				x = this._template.a,
				w = "",
				y = function(t) {
					for(var s = "", o = 0, n = i.num; n > o;) {
						for(var m = "", _ = 0; l > _; _++, o++) {
							var w = e.getEmotionFileName(h, o + 1, f);
							if(w && n > o) {
								var y = a + w + "?t=20140803",
									j = r > _ ? 0 : 1,
									C = p * o * -1;
								("lt" == t || "ali" == t) && (C -= 1), "ali" == t && (C += 3);
								var E = "text" == i.type ? i.tip[o] : "&nbsp;",
									T = $.tb.format(x, {
										offset: C,
										content: E
									});
								m += $.tb.format(v, {
									tdClassName: u,
									tdWidth: c,
									tdHeight: d,
									index: o,
									groupName: t,
									configType: i.type,
									tip: i.tip[o],
									url: y,
									posflag: j,
									content: T
								})
							} else m += $.tb.format(g, {})
						}
						s += $.tb.format(b, {
							content: m
						})
					}
					return s
				};
			m = "custom" == i.type ? this.generateCustomTable() : y(t), w += $.tb.format(_, {
				content: m
			}), s.setContent(w), s.$content.css("height", 277)
		},
		generateCustomTable: function() {
			function t(t, e) {
				return t ? t.option ? '<td><button type="button" class="j_add_emotion">\u6dfb\u52a0</button></td>' : (t.posFlag = 5 > e ? 0 : 1, $.tb.format('<td class="emotion_cell"><a href="javascript:void(0)" class="j_custom_emotion" data-surl="#{url}" data-posflag="#{posFlag}"><div class="emotion_hole"><img title="#{title}" src="#{thumbnail}" onload="$.tb.resizePic(this, 50, 50, true);" /></div><div class="emotion_delete j_delete"></div></a></td>', t)) : "<td>&nbsp;</td>"
			}

			function e(e, s) {
				var o = [];
				o.push("<tr>");
				for(var i = 0; 10 > i; i++) o.push(t(e[i + s], i));
				return o.push("</tr>"), o.join("")
			}
			var s = this.customEmotion.getCustomEmotions();
			s.push({
				option: "add"
			});
			for(var o = [], i = 0, n = Math.floor(s.length / 10) + 1; n > i; i++) o.push(e(s, 10 * i));
			return "<table class='ue_emotion_table' cellspacing='1'>" + o.join("") + "</table>"
		},
		generateTabList: function() {
			for(var t = this.sequence, e = this.emotionConfig, s = this._template.tab, o = this._template.tabItem, i = "", n = 0, a = t.length; a > n; n++) {
				var l = t[n];
				if(e[l].power) {
					var r = {
						isSelected: l === this.currentGroup ? "selected" : "",
						index: n,
						type: l,
						name: e[l].name
					};
					i += $.tb.format(o, r)
				}
			}
			i = $.tb.format(s, {
				content: i
			}), this.$tab.html(i)
		},
		getTab: function(t) {
			return this.$tab.find("li").filter('[data-type="' + t + '"]')
		},
		nextTab: function() {
			var t = this,
				e = this.$tab.find("ul");
			t.count = ++t.count >= t.colsNum ? t.colsNum - 1 : t.count, e.stop().animate({
				marginLeft: -502 * t.count
			}, 500, "linear")
		},
		prevTab: function() {
			var t = this,
				e = this.$tab.find("ul");
			t.count = --t.count < 1 ? 0 : t.count, e.stop().animate({
				marginLeft: -502 * t.count
			}, 500, "linear")
		},
		activateTab: function(t) {
			var e = this.$tab;
			e.find("li").removeClass("selected"), this.getTab(t).addClass("selected")
		},
		switchTab: function(t) {
			var e = this;
			e.currentGroup = t, e.activateTab(t), e.generateEmotions(t)
		}
	}
});
_.Module.define({
	path: "ueditor/widget/emotion",
	requires: ["ueditor/widget/ueditor_emotion"],
	sub: {
		initial: function(t, e) {
			t = t || window.UE, e = e || window.EditorUI, this.initPlugin(t, this), this.initLayer(e, this), this.initModel(e, this), this.initAdapter(t, e, this)
		},
		initPlugin: function() {},
		initLayer: function(t, e) {
			t.registerLayer("emotion", function(t) {
				var i = '<div class="j_emotion_container emotion_container"></div>',
					n = $(i),
					o = $.eduipopup().on("beforeshow", function() {
						if(!t.getValue("UeditorEmotion")) {
							var i = o.edui().getBodyContainer();
							i.html(""), i.append(n);
							var r = e.requireInstance("ueditor/widget/ueditor_emotion", [{
								container: n,
								customEmotionEnable: PosterContext.getAuthorities().custom_emotion
							}]);
							t.setValue("UeditorEmotion", r), r.bind("insertemotion", function(e, i) {
								t.trigger("insertemotion", i)
							}), t.bind("aftershow", function() {
								r.scrollPanel._resizeScroll()
							})
						}
						$.browser.msie && 6 == $.browser.version && $("#tb_rich_poster").find(".j_sign_id").hide()
					});
				return $.browser.msie && 6 == $.browser.version && o.on("afterhide", function() {
					$("#tb_rich_poster").find(".j_sign_id").show()
				}), t.setWidget(o), o
			})
		},
		initModel: function(t) {
			t.registerModel("emotion", function() {
				var e = new t.EditorModel;
				t.bindLayer("emotion", e);
				var i = $.eduibutton({
					icon: "emotion",
					title: "\u63d2\u5165\u8868\u60c5"
				});
				return e.setButton(i), e
			})
		},
		initAdapter: function(t, e) {
			t.registerUI("emotion", function(t) {
				var i = this,
					n = e.getModel(t),
					o = n.getButton(),
					r = n.getWidget();
				return o.click(function() {
					r.parent().length || i.$container.find(".edui-dialog-container").append(r), r.css("zIndex", i.options.zIndex + 1).edui().show(o, {
						offsetTop: -10,
						offsetLeft: 225,
						caretLeft: 247,
						caretTop: -8
					}), n.trigger("aftershow"), $.stats.track("emotion_btn", "ueditor")
				}), r.edui().register("click", r, function(t) {
					o[0] === t.target || $.contains(o[0], t.target) || r.edui().hide()
				}), n.bind("insertemotion", function(t, e) {
					if("custom" == e.type) e.picType = 1, i.execCommand("insertimage", [e]);
					else {
						var n = '<img unselectable="on" pic_type="" class="BDE_Smiley" src="#{url}">',
							o = "text" === e.type ? e.title : $.tb.format(n, e);
						i.execCommand("inserthtml", o)
					}
					r.hide()
				}), o
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/ueditor_video/ueditor_local_video",
	requires: [],
	sub: {
		tempHTML: ['<div style="padding:30px 0px 5px 30px" class="clearfix"><input type="text" class="v_layer_input j_input" value="\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740"  ><a href="#" style="float:left;margin-left:5px;" class="ui_btn ui_btn_m j_btn"><span><em>\u63d2\u5165\u89c6\u9891</em></span></a></div>', '<div  class="j_error_tip v_error_tip" style="display:none;padding-left:30px;line-height:22px;"></div>', '<div style="color:#999;line-height:22px;padding:0 30px;" class="v_layer_text j_layer_text">\u76ee\u524d\u652f\u6301\u7231\u5947\u827a\u3001\u7f8e\u62cd\u3001\u4f18\u9177\u3001\u571f\u8c46\u3001\u641c\u72d0\u3001\u817e\u8baf\u3001\u4e50\u89c6\u3001ACFUN\u3001Bilibili\u7b49\u89c6\u9891\u7f51\u7ad9\u94fe\u63a5<br />\u89c6\u9891\u64ad\u653e\u9875\u94fe\u63a5</div>'].join(""),
		_dialogWidth: 457,
		initial: function(t) {
			var e = this;
			e.j_con = t && t.j_con, this.parent = t && t.parent, $.JsLoadManager.use("//tb1.bdstatic.com/tb/_/sdkbase_62fc6a5.js", function() {
				e.createUploader(), e.getbaiduauth()
			}), this.parent.bind("closelocalvideo", function() {
				$.browser.msie && $.browser.version < 10 && $('[data^="http://www.iqiyi.com/player/cupid/common/VideoUploader.swf"]').hide()
			})
		},
		init: function(t) {
			var e = this;
			e.j_con = t.j_con, e.parent = t.parent, e._showDialog || ($(e.j_con).offset(), this.vcop && e.vcop.authtoken ? (e.resetBtn("40px", "150px", 12), e.uploader || this.initUploader()) : $.JsLoadManager.use("//tb1.bdstatic.com/tb/_/sdkbase_62fc6a5.js", function() {
				e.createUploader(), e.getbaiduauth()
			}))
		},
		resetBtn: function(t, e, i) {
			var o = this,
				a = $(o.j_con).offset();
			this.vcop.resetBtn({
				uploadBtn: {
					dom: this.j_con,
					btnH: t,
					btnW: e,
					btnT: a.top + "px",
					btnL: a.left + "px",
					btnZ: i,
					hasBind: !1
				}
			}), $.browser.msie && $.browser.version < 10 && $('[data^="http://www.iqiyi.com/player/cupid/common/VideoUploader.swf"]').show()
		},
		createUploader: function() {
			var t = this,
				e = $(t.j_con).offset();
			if(window.qiyivcop) t.vcop = window.qiyivcop;
			else {
				var i = new Q.vcopClient({
					uploadBtn: {
						container: t.j_con,
						dom: t.j_con,
						btnH: "40px",
						btnW: "150px",
						btnT: e.top + "px",
						btnL: e.left + "px",
						btnZ: "12",
						hasBind: !1
					},
					appKey: "0E6E5A4747B5BF9E",
					appSecret: "0E6E5A4747B5BF9E",
					managerUrl: "http://openapi.iqiyi.com/",
					uploadUrl: "http://qichuan.iqiyi.com/"
				});
				window.qiyivcop = i, t.vcop = window.qiyivcop
			}
		},
		getbaiduauth: function() {
			var t = this;
			$(t.j_con).offset(), t.vcop.getAuthBaidu({
				ouid: PageData.user.open_uid || 3238335284,
				nick: PageData.user.name_weak || "huair_12",
				client_id: "0E6E5A4747B5BF9E"
			}, function(e) {
				if(e && (t.vcop.authtoken = e.data.access_token, t.resetBtn("40px", "150px", 12), t.initUploader(), $.browser.msie)) {
					var i = $(t.j_con).offset();
					t.uploader && t.uploader.initOneFile({
						btnH: "40px",
						btnW: "150px",
						btnT: i.top + "px",
						btnZ: 12,
						btnL: i.left + "px"
					})
				}
			})
		},
		showError: function(t) {
			var e = this,
				t = t || "<p>1\u3001\u8bf7\u5c06\u89c6\u9891\u5927\u5c0f\u63a7\u5236\u57281G\u4ee5\u5185</p><p>2\u3001\u652f\u6301\u4e0a\u4f20\u7684\u89c6\u9891\u683c\u5f0f\u6709:mpg\u3001mpeg\u3001mp4\u3001m4v\u3001flv\u3001f4v\u3001mkv\u3001avi\u3001rm\u3001rmvb\u3001wmv\u3001mov\u3001ts\u3001vob</p>",
				i = '<div class="v_upload_wrapper"><p class="v_upload_title">\u89c6\u9891\u4e0a\u4f20\u5931\u8d25</p><div  style="line-height:22px;padding-top:10px;font-size:14px;color:#505050;font-family: arial;">' + t + "</div></div>";
			this.eContent = $(i);
			var o = {
				html: this.eContent,
				title: "\u4e0a\u4f20\u89c6\u9891",
				width: 540,
				height: 124,
				closeable: !0
			};
			e._showDialog && (e.success = !0, e.lDialogOp.close(), $(window).unbind("beforeunload.pageChange")), e.errorDialogOp = new $.dialog(o), e.errorDialogOp.bind("onclose", function() {
				$(window).unbind("beforeunload.pageChange")
			})
		},
		initUploader: function() {
			var t = this.vcop,
				e = this;
			t.authtoken ? e.uploader = t.initUpload({
				access_token: t.authtoken,
				device_id: "test",
				uid: "test"
			}, {
				onSuccess: function(t) {
					if(t && t.data) {
						e.fileinfo = t.data;
						var i = e.fileinfo.file_size;
						if(i > 1073741824) return e.showError(), void 0;
						e.renderDialog(), e.sartUpload()
					}
				},
				onError: function(t) {
					t && t.msg ? e.showError(t.msg) : e.showError("\u7f51\u7edc\u9519\u8bef")
				}
			}) : t.getAuthNormal()
		},
		_showDialog: !1,
		renderDialog: function() {
			var t = this,
				e = '<div class="v_upload_wrapper"><p class="v_upload_title">\u89c6\u9891\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u4e0d\u8981\u5173\u95ed\u7a97\u53e3</p><div class="v_uploader_pro"><b class="j_progress"></b><span class="v_percent">0%</span><a href="#" class="v_control" data-type="uploading">\u6682\u505c</a></div><ul class="v_upload_info"><li style="width:156px"><span >\u901f\u5ea6\uff1a<span class="v_speed">0kb</span>/S</span></li><li style="width:195px">\u5df2\u4e0a\u4f20\uff1a<span class="v_finished">0MMB</span>/<span class="v_total">0MB</span></li><li><span>\u5269\u4f59\u65f6\u95f4\uff1a<span class="v_time">0</span>\u79d2</span></li></ul></div>';
			this.dContent = $(e);
			var i = {
				html: this.dContent,
				title: "\u4e0a\u4f20\u89c6\u9891",
				width: 540,
				height: 114,
				modal: !1,
				closeable: !0
			};
			t.lDialogOp = new $.dialog(i), $(window).bind("beforeunload.pageChange", function(t) {
				return t = t || window.event, t && (t.returnValue = "Any string"), "\u89c6\u9891\u6b63\u5728\u4e0a\u4f20\u4e2d\uff0c\u662f\u5426\u786e\u5b9a\u9000\u51fa\uff1f"
			}), $.browser.msie ? this.dContent.find(".v_control").hide() : this.dContent.delegate(".v_control", "click", function() {
				var e = $(this),
					i = e.data("type");
				return "uploading" == i ? (t.pauseUpload(), e.data("type", "pause"), e.html("\u7ee7\u7eed")) : (t.resumeUpload(), e.data("type", "uploading"), e.html("\u6682\u505c")), !1
			}), t.lDialogOp.bind("onclose", function() {
				if(!t.success) {
					var e = confirm("\u786e\u8ba4\u8981\u53d6\u6d88\u89c6\u9891\u4e0a\u4f20\u5417\uff1f");
					return 1 == e ? (t.cancelUpload(), $(window).unbind("beforeunload.pageChange"), t._showDialog = !1, !0) : !1
				}
				t._showDialog = !1
			}), t.lDialogOp.show(), t._showDialog = !0
		},
		_MB: 1048576,
		updateProgressBar: function(t) {
			var e = this.dContent.find(".j_progress"),
				i = this.dContent.find(".v_percent"),
				o = this.dContent.find(".v_speed"),
				a = this.dContent.find(".v_time"),
				n = this.dContent.find(".v_total"),
				r = this.dContent.find(".v_finished"),
				s = this,
				l = t.total / 1024,
				d = t.finished / 1024;
			o.html(s.getFloorNum(t.speed, 3) + "kb"), n.html(s.getFloorNum(l, 2) + "MB"), r.html(s.getFloorNum(d, 2) + "MB"), a.html(s.getFloorNum(t.remainTime, 0)), i.html(t.percent + "%"), e.width(t.percent + "%")
		},
		getFloorNum: function(t, e) {
			var i = t + "",
				o = i.split("."),
				a = o[0] + "";
			return o[1] && e > 0 && (a += "." + o[1].substr(0, e)), a
		},
		_addFile: {},
		sartUpload: function() {
			var t = this;
			t.startTime = (new Date).getTime(), t.success = !1, t.uploader.startUpload(t.fileinfo, {
				onFinish: function(e) {
					e && e.manualFinish === !0 ? t.uploader.finishUpload({
						onSuccess: function() {
							t.uploadSuccess()
						},
						onError: function() {
							t.showError()
						}
					}) : t._addFile[t.fileinfo.file_id] || t.uploadSuccess()
				},
				onError: function() {
					t.showError()
				},
				onProgress: function(e) {
					t.updateProgressBar(e)
				}
			})
		},
		uploadSuccess: function() {
			var t = this;
			t.success = !0, t.lDialogOp.close(), $(window).unbind("beforeunload.pageChange");
			var e = t.fileinfo.file_id;
			t._addFile[e] = e, setTimeout(function() {
				t.parent.trigger("insertvideo", {
					swf_url: "http://www.iqiyi.com/src_" + e + ".swf",
					html_url: "vsrc_" + e,
					pkey: "pkey_" + e,
					vpic: "vpic_" + e,
					html5: "null",
					vsrc: "vsrc_" + e
				})
			}, 100)
		},
		pauseUpload: function() {
			this.uploader.pauseUpload()
		},
		resumeUpload: function() {
			var t = this;
			t.uploader.resumeUpload({
				onFinish: function() {
					t.uploader.finishUpload({
						onSuccess: function() {
							t.uploadSuccess()
						},
						onError: function() {
							t.showError()
						}
					})
				},
				onError: function() {
					t.showError()
				},
				onProgress: function(e) {
					t.updateProgressBar(e)
				}
			})
		},
		cancelUpload: function() {
			var t = this;
			t.uploader.cancelUpload({
				onSuccess: function() {},
				onError: function() {}
			})
		}
	}
}), _.Module.define({
	path: "ueditor/widget/ueditor_video/ueditor_url_video",
	sub: {
		tempHTML: ['<div style="padding:30px 0px 5px 30px" class="clearfix"><input type="text" class="v_layer_input form-control j_input" value="\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740"  ><a href="#" style="float:left;margin-left:5px;" class="btn_default btn_middle j_btn">\u63d2\u5165\u89c6\u9891</a></div>', '<div  class="j_error_tip v_error_tip" style="display:none;padding-left:30px;line-height:22px;"></div>', '<div style="color:#999;line-height:22px;padding:0 30px;" class="v_layer_text j_layer_text">\u76ee\u524d\u652f\u6301\u7231\u5947\u827a\u3001\u7f8e\u62cd\u3001\u4f18\u9177\u3001\u571f\u8c46\u3001\u641c\u72d0\u3001\u817e\u8baf\u3001\u4e50\u89c6\u3001ACFUN\u3001Bilibili\u7b49\u89c6\u9891\u7f51\u7ad9\u94fe\u63a5</div>'].join(""),
		_defaultHtml: "\u76ee\u524d\u652f\u6301\u7231\u5947\u827a\u3001\u7f8e\u62cd\u3001\u4f18\u9177\u3001\u571f\u8c46\u3001\u641c\u72d0\u3001\u817e\u8baf\u3001\u4e50\u89c6\u3001ACFUN\u3001Bilibili\u7b49\u89c6\u9891\u7f51\u7ad9\u94fe\u63a5",
		initial: function(t) {
			t = $.extend({}, t), this.parent = t.parent, this.urlLength = t.urlLength || 1024;
			var e = {
				convert_urls: [
					[/http:\/\/my\.tv\.sohu\.com\/u\/vw\/([0-9a-zA-Z_]*)$/gi, "http://my.tv.sohu.com/fo/v4/$1/my.swf"],
					[/http:\/\/tv\.sohu\.com\/([0-9a-zA-Z_]*)\/([0-9a-zA-Z_]*)\.shtml$/gi, "http://api.tv.sohu.com/url/$1/$2.shtml"],
					[/http:\/\/client\.joy\.cn\/flvplayer\/([0-9a-zA-Z]*)_([0-9]*)_[1-9]*_([0-9]*)\.swf$/gi, "http://client.joy.cn/flvplayer/$1_$2_0_$3.swf"],
					[/http:\/\/www\.56\.com\/u([0-9]*)\/v_([0-9a-zA-Z_]*)\.html$/gi, "http://player.56.com/v_$2.swf"],
					[/http:\/\/www\.56\.com\/w([0-9]*)\/play_album-aid-([0-9]*)_vid-([0-9a-zA-Z_]*)\.html$/gi, "http://player.56.com/v_$3.swf"],
					[/http:\/\/www\.letv\.com\/ptv\/vplay\/([0-9a-zA-Z_]*)(\.html)?$/gi, "http://www.letv.com/player/share/baidu/x$1.swf"],
					[/http:\/\/www\.letv\.com\/player\/x([0-9a-zA-Z_]*)\.swf$/gi, "http://www.letv.com/player/share/baidu/x$1.swf"],
					[/http:\/\/www\.aipai\.com\/([a-z]*)([0-9]*)\/([0-9a-zA-Z]*)\.html$/gi, "http://www.aipai.com/$1$2/$3/playerOut.swf"],
					[/http:\/\/mv\.molihe\.com\/show\/([0-9]*)$/gi, "http://mv.molihe.com/molihe_play-1-$1.swf"],
					[/http:\/\/www\.tudou\.com\/programs\/view\/([0-9a-zA-Z]*)\/?$/gi, "http://www.tudou.com/v/$1/v.swf"],
					[/http:\/\/www\.boosj\.com\/([0-9]*)\.html$/gi, "http://static.boosj.com/v/swf/w_player1.0_$1.swf"],
					[/http:\/\/([0-9a-zA-Z_]*)\.kankanews\.com\/vods\/([0-9a-zA-Z_]*)\/([0-9a-zA-Z_]*)(\/)?$/gi, "http://www.kankanews.com/object/kankanewsplayer-tieba.swf?autoPlay=false&streamType=recorded&mutiDynamicStreamPlay=true&cid=$2&vid=$3&server=http://www.kankanews.com/dataservice/&otherLink=true&bufferTime=4"],
					[/http:\/\/www\.kankanews\.com\/object\/kankanewsplayer([0-9a-zA-Z\-\.]*)\.swf/gi, "http://www.kankanews.com/object/kankanewsplayer3.0.swf"],
					[/http:\/\/www\.m1905\.com\/video\/play\/([0-9]*)\.shtml$/gi, "http://www.m1905.com/video/s/$1/v.swf?autoplay=0"],
					[/http:\/\/www\.m1905\.com\/video\/m\/([0-9]*)\/v\.swf/gi, "http://www.m1905.com/video/s/$1/v.swf?autoplay=0"],
					[/http:\/\/v\.ifeng\.com\/news\/([0-9a-zA-Z_\-]*)\/([0-9]{6})\/([0-9a-zA-Z_\-]*)\.shtml/gi, "http://v.ifeng.com/include/exterior.swf?guid=$3&AutoPlay=false"],
					[/http:\/\/s\.v\.ifeng\.com\/([0-9a-zA-Z_\-]*)\/([0-9a-zA-Z_\-]*)/gi, "http://s.v.ifeng.com/tieba/$1/$2.swf"],
					[/(http:\/\/share\.vrs\.sohu\.com\/[0-9a-zA-Z_]*\/v\.swf)(\S*)(&xuid\s*)$/gi, "$1&autoplay=false$3"],
					[/http:\/\/v\.youku\.com\/v_show\/id_([0-9a-zA-Z_]+)\.html/gi, "http://player.youku.com/player.php/sid/$1/v.swf"],
					[/http:\/\/www\.tudou\.com\/programs\/view\/([0-9a-zA-Z]*)\/?$/gi, "http://www.tudou.com/v/$1/v.swf"],
					[/http:\/\/v\.ku6\.com\/show\/([0-9a-zA-Z_\.&\?]+).html/gi, "http://player.ku6.com/refer/$1/v.swf"],
					[/http:\/\/v\.ku6\.com\/special\/([0-9a-zA-Z_\.&\?]+).html/gi, "http://player.ku6.com/refer/$1/v.swf"],
					[/http:\/\/www\.56\.com\/u([0-9a-zA-Z_]+)\/([0-9a-zA-Z_\.&\?]+).html/gi, "http://player.56.com/$2.swf"],
					[/(http:\/\/www\.cutv\.com\/static\/player\/v\.swf\?(id|pid|video)=[0-9a-zA-Z_\/\:\-\%\.]*)(\S*)$/gi, "$1&autoplay=false"]
				],
				mp4_url: [],
				convertToMp4: function(t) {
					for(var e = this.mp4_url, i = t, o = 0; o < e.length; o++) t = t.replace(e[o][0], e[o][1]);
					return t == i && (t = ""), t
				},
				auto_params: [
					["client.joy.cn", "playstatus", /playstatus=/gi, "0"],
					["//v.ifeng.com", "AutoPlay", /AutoPlay=/gi, "false"],
					["m1905.com", "autoplay", /autoplay=/gi, "0"],
					["kankanews.com", "otherLink", /otherLink=/gi, "false"]
				],
				convert: function(t) {
					for(var e = this.convert_urls, i = 0; i < e.length; i++) t = t.replace(e[i][0], e[i][1]);
					return t
				},
				filter_param: function(t) {
					t.indexOf("share.vrs.sohu.com") < 0 && (t = t.replace(/(\&)?\w*auto\w*=[\w\d]+/gi, ""));
					for(var e = this.auto_params, i = 0; i < e.length; i++) {
						var o = e[i];
						t.indexOf(o[0]) > -1 && (t = t.replace(o[2], "old_invalid="), t += (t.indexOf("?") > -1 ? "&" : "?") + o[1] + "=" + o[3])
					}
					return t
				}
			};
			this.Post_Video_URL = e
		},
		init: function(t, e) {
			var i = this;
			t.addClass("url_video_container"), t.html(this.tempHTML), this.j_input = t.find(".j_input"), this.j_con = t, this.editor = e, this.j_error_tip = t.find(".j_error_tip"), this.j_layer_text = t.find(".j_layer_text"), this.j_btn = t.find(".j_btn"), this.j_btn.click(function(t) {
				t.preventDefault(), t.stopPropagation(), i.accept()
			}), this.bindInput()
		},
		destroy: function() {
			this.j_con = null
		},
		onBlurInput: function() {
			var t = this.j_input[0],
				e = this;
			"" == t.value ? (t.value = "\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740", t.style.color = "#ccc", this.j_error_tip.hide()) : "\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740" != t.value && e.inputTip()
		},
		insertFlash: function(t, e, i, o) {
			var a = this;
			a.getVideoInfo(t, e);
			var n = (this.editor, a.videoInfo);
			return n && n.swf_url ? (this.parent.trigger("insertvideo", {
				swf_url: n.swf_url || "null",
				html_url: n.html_url || "null",
				pkey: n.pri_key || "null",
				vpic: n.img_url || "null",
				html5: n.html5 || "null"
			}), "html" == o && $.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=htmlUrl&st_value=1"), "tdswf" == o && $.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=tdswfUrl&st_value=1"), !0) : (0 == e && this.showError(i), !1)
		},
		bindInput: function() {
			var t = this.j_input,
				e = this;
			t.keyup(function(t) {
				var i = t || window.event;
				86 == i.keyCode && e.inputTip()
			}), t.bind("input", function() {
				return "" == this.value || "\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740" == this.value ? (e.showError(e._defaultHtml, "#999999"), !0) : (e.inputTip(), !0)
			}), t.bind("propertychange", function() {
				return "" == this.value || "\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740" == this.value ? (e.showError(e._defaultHtml, "#999999"), !0) : (e.inputTip(), !0)
			}), this.j_input.blur(function() {
				e.onBlurInput()
			}), this.j_input.click(function() {
				e.onClickInput(), this.focus()
			})
		},
		showError: function(t, e) {
			this.j_layer_text.html(t), e = e ? e : "#ff0000", this.j_layer_text.css({
				color: e
			}), this.j_layer_text.show()
		},
		inputTip: function() {
			var t = this.j_input,
				e = this,
				i = t.val().trim();
			i = e.formatUrl(i);
			var o = e.checkInApi(i),
				a = e.checkType(i);
			return "illegal" == a ? (e.showError("\u8f93\u5165\u94fe\u63a5\u6709\u8bef\uff0c\u8bf7\u91cd\u8bd5"), void 0) : o && "swf" == a ? (e.showError("\u63d0\u793a\uff1a\u8be5\u89c6\u9891\u683c\u5f0f\u65e0\u6cd5\u5728\u624b\u673a\u6216pad\u4e0a\u64ad\u653e\u54e6~\u8bf7\u7c98\u8d34\u5176\u4ed6\u7c7b\u578b\u94fe\u63a5\u5730\u5740\u5427\u3002"), void 0) : o || "html" != a ? (e.showError(e._defaultHtml, "#999999"), void 0) : (e.showError("\u63d0\u793a\uff1a\u8d34\u5427\u6682\u4e0d\u652f\u6301\u8be5\u7f51\u7ad9\u7684\u64ad\u653e\u9875\u5730\u5740\uff0c\u8bf7\u76f4\u63a5\u4f7f\u7528\u89c6\u9891\u5730\u5740\u3002"), void 0)
		},
		onClickInput: function() {
			var t = this.j_input[0];
			"\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740" == t.value && (t.value = "", t.style.color = "#000000")
		},
		IE: !(!window.attachEvent || window.opera),
		validAddrPrefixs: ["http://img.ku6.com/common/V2.0.baidu.swf?vid=", "http://www.tudou.com/v/", "http://www.tudou.com/player/playlist.swf?lid=", "http://www.56.com/", "http://player.youku.com/", "http://6.cn/", "http://player.ku6.com/refer/", "http://tv.mofile.com/cn/xplayer.swf?v=", "http://v.blog.sohu.com/fo/v4/", "http://v.blog.sohu.com/fo/p4/", "http://vhead.blog.sina.com.cn/player/outer_player.swf?", "http://img.openv.tv/hd/swf/hd_player.swf?pid=", "http://www.cnboo.com/flash/player.swf?ids=", "http://video.pomoho.com/swf/out_player.swf?flvid=", "http://video.cctv.com/flash/cctv_player.swf?VideoID=", "http://misc.home.news.cn/video/swf/VideoDisplay.swf?videoSource=", "http://mv.baidu.com/export/flashplayer.swf?playlist=", "http://mv.baidu.com/export/flashplayer.swf?vid=", "http://client.joy.cn/flvplayer/", "http://www.meipai.com/", "http://baishi.baidu.com/", "http://www.acfun.tv", "http://www.bilibili.com", "http://bangumi.bilibili.com"],
		accept: function() {
			$.stats.hive("videoByLayer_insert"), this.editor, PosterContext.getAuthorities().white_list ? PosterContext.getAuthorities().white_list : this.validAddrPrefixs;
			var t = this,
				e = (t.Post_Video_URL, t.formatUrl($.trim(t.j_input.val()))),
				i = t.checkInApi(e),
				o = t.checkType(e),
				a = e.toLowerCase();
			if(a.length <= 0 || "https://" == a || "http://" == a || "ftp://" == a || "rtsp://" == a || "mms://" == a) return this.showError("\u89c6\u9891\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a"), !1;
			if(e.getByteLength() > this.urlLength || "illegal" == o) return t.showError("\u8f93\u5165\u94fe\u63a5\u6709\u8bef\uff0c\u8bf7\u91cd\u8bd5"), !1;
			if(!i && "html" == o) return t.showError("\u63d0\u793a\uff1a\u8d34\u5427\u6682\u4e0d\u652f\u6301\u8be5\u7f51\u7ad9\u7684\u64ad\u653e\u9875\u5730\u5740\uff0c\u8bf7\u76f4\u63a5\u4f7f\u7528\u89c6\u9891\u5730\u5740\u3002"), void 0;
			if(!i || "html" != o) return t.showError("\u63d0\u793a\uff1a\u8be5\u89c6\u9891\u683c\u5f0f\u65e0\u6cd5\u5728\u624b\u673a\u6216pad\u4e0a\u64ad\u653e\u54e6~\u8bf7\u7c98\u8d34\u5176\u4ed6\u7c7b\u578b\u94fe\u63a5\u5730\u5740\u5427\u3002"), !1;
			var n = t.insertFlash(e, 0, "\u5bf9\u4e0d\u8d77\uff0c\u60a8\u8f93\u5165\u7684\u89c6\u9891\u64ad\u653e\u9875\u94fe\u63a5\u65e0\u6548\uff0c\u8bf7\u91cd\u8bd5", "html");
			return n ? ($.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=videoByLayer&st_value=1"), !1) : ($.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=htmlFail&st_value=1"), !1)
		},
		isRever: function(t) {
			for(var e = ["youku.com", "tudou.com"], i = 0, o = e.length; o > i; i++)
				if(-1 != t.search(e[i])) return !0;
			return !1
		},
		getVideoInfo: function(t, e) {
			var i = this;
			$.ajax({
				url: "/f/commit/commonapi/getVideoInfoApi",
				data: {
					url: t,
					type: e
				},
				type: "post",
				dataType: "json",
				success: function(t) {
					0 == t.no && (i.videoInfo = t.data)
				},
				async: !1
			})
		},
		formatUrl: function(t) {
			var e = t.replace(/^http:\/\/http:\/\//g, "http://"),
				i = /^(https:\/\/|http:\/\/|ftp:\/\/|rtsp:\/\/|mms:\/\/)/;
			return i.test(e.toLowerCase()) || (e = "http://" + e), e
		},
		checkType: function(t) {
			var e = /(\.xml|\.jpg|\.jpeg|\.bmp|\.png|\.gif|\.tif)$/;
			return e.test(t) ? "illegal" : (e = /\.swf/, e.test(t) ? "swf" : "html")
		},
		checkInApi: function(t) {
			for(var e = ["youku.com", "tudou.com", "qiyi.com", "letv.com", "56.com", "ifeng.com", "ku6.com", "qq.com", "sohu.com", "sina.com.cn", "funshion.com", "yinyuetai.com", "v.pps.tv", "ipd.pps.tv", "aipai.com", "mgtv.com", "meipai.com", "baishi.baidu.com", "acfun.tv", "bilibili.com"], i = 0, o = e.length; o > i; i++)
				if(-1 != t.search(e[i])) return !0;
			return !1
		}
	}
});
try {
	var CryptoJS = CryptoJS || function(t, e) {
		var i = {},
			o = i.lib = {},
			a = function() {},
			n = o.Base = {
				extend: function(t) {
					a.prototype = this;
					var e = new a;
					return t && e.mixIn(t), e.hasOwnProperty("init") || (e.init = function() {
						e.$super.init.apply(this, arguments)
					}), e.init.prototype = e, e.$super = this, e
				},
				create: function() {
					var t = this.extend();
					return t.init.apply(t, arguments), t
				},
				init: function() {},
				mixIn: function(t) {
					for(var e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
					t.hasOwnProperty("toString") && (this.toString = t.toString)
				},
				clone: function() {
					return this.init.prototype.extend(this)
				}
			},
			r = o.WordArray = n.extend({
				init: function(t, i) {
					t = this.words = t || [], this.sigBytes = i != e ? i : 4 * t.length
				},
				toString: function(t) {
					return(t || l).stringify(this)
				},
				concat: function(t) {
					var e = this.words,
						i = t.words,
						o = this.sigBytes;
					if(t = t.sigBytes, this.clamp(), o % 4)
						for(var a = 0; t > a; a++) e[o + a >>> 2] |= (i[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 24 - 8 * ((o + a) % 4);
					else if(65535 < i.length)
						for(a = 0; t > a; a += 4) e[o + a >>> 2] = i[a >>> 2];
					else e.push.apply(e, i);
					return this.sigBytes += t, this
				},
				clamp: function() {
					var e = this.words,
						i = this.sigBytes;
					e[i >>> 2] &= 4294967295 << 32 - 8 * (i % 4), e.length = t.ceil(i / 4)
				},
				clone: function() {
					var t = n.clone.call(this);
					return t.words = this.words.slice(0), t
				},
				random: function(e) {
					for(var i = [], o = 0; e > o; o += 4) i.push(4294967296 * t.random() | 0);
					return new r.init(i, e)
				}
			}),
			s = i.enc = {},
			l = s.Hex = {
				stringify: function(t) {
					var e = t.words;
					t = t.sigBytes;
					for(var i = [], o = 0; t > o; o++) {
						var a = e[o >>> 2] >>> 24 - 8 * (o % 4) & 255;
						i.push((a >>> 4).toString(16)), i.push((15 & a).toString(16))
					}
					return i.join("")
				},
				parse: function(t) {
					for(var e = t.length, i = [], o = 0; e > o; o += 2) i[o >>> 3] |= parseInt(t.substr(o, 2), 16) << 24 - 4 * (o % 8);
					return new r.init(i, e / 2)
				}
			},
			d = s.Latin1 = {
				stringify: function(t) {
					var e = t.words;
					t = t.sigBytes;
					for(var i = [], o = 0; t > o; o++) i.push(String.fromCharCode(e[o >>> 2] >>> 24 - 8 * (o % 4) & 255));
					return i.join("")
				},
				parse: function(t) {
					for(var e = t.length, i = [], o = 0; e > o; o++) i[o >>> 2] |= (255 & t.charCodeAt(o)) << 24 - 8 * (o % 4);
					return new r.init(i, e)
				}
			},
			p = s.Utf8 = {
				stringify: function(t) {
					try {
						return decodeURIComponent(escape(d.stringify(t)))
					} catch(e) {
						throw Error("Malformed UTF-8 data")
					}
				},
				parse: function(t) {
					return d.parse(unescape(encodeURIComponent(t)))
				}
			},
			c = o.BufferedBlockAlgorithm = n.extend({
				reset: function() {
					this._data = new r.init, this._nDataBytes = 0
				},
				_append: function(t) {
					"string" == typeof t && (t = p.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes
				},
				_process: function(e) {
					var i = this._data,
						o = i.words,
						a = i.sigBytes,
						n = this.blockSize,
						s = a / (4 * n),
						s = e ? t.ceil(s) : t.max((0 | s) - this._minBufferSize, 0);
					if(e = s * n, a = t.min(4 * e, a), e) {
						for(var l = 0; e > l; l += n) this._doProcessBlock(o, l);
						l = o.splice(0, e), i.sigBytes -= a
					}
					return new r.init(l, a)
				},
				clone: function() {
					var t = n.clone.call(this);
					return t._data = this._data.clone(), t
				},
				_minBufferSize: 0
			});
		o.Hasher = c.extend({
			cfg: n.extend(),
			init: function(t) {
				this.cfg = this.cfg.extend(t), this.reset()
			},
			reset: function() {
				c.reset.call(this), this._doReset()
			},
			update: function(t) {
				return this._append(t), this._process(), this
			},
			finalize: function(t) {
				return t && this._append(t), this._doFinalize()
			},
			blockSize: 16,
			_createHelper: function(t) {
				return function(e, i) {
					return new t.init(i).finalize(e)
				}
			},
			_createHmacHelper: function(t) {
				return function(e, i) {
					return new h.HMAC.init(t, i).finalize(e)
				}
			}
		});
		var h = i.algo = {};
		return i
	}(Math);
	! function(t) {
		function e(t, e, i, o, a, n, r) {
			return t = t + (e & i | ~e & o) + a + r, (t << n | t >>> 32 - n) + e
		}

		function i(t, e, i, o, a, n, r) {
			return t = t + (e & o | i & ~o) + a + r, (t << n | t >>> 32 - n) + e
		}

		function o(t, e, i, o, a, n, r) {
			return t = t + (e ^ i ^ o) + a + r, (t << n | t >>> 32 - n) + e
		}

		function a(t, e, i, o, a, n, r) {
			return t = t + (i ^ (e | ~o)) + a + r, (t << n | t >>> 32 - n) + e
		}
		for(var n = CryptoJS, r = n.lib, s = r.WordArray, l = r.Hasher, r = n.algo, d = [], p = 0; 64 > p; p++) d[p] = 4294967296 * t.abs(t.sin(p + 1)) | 0;
		r = r.MD5 = l.extend({
			_doReset: function() {
				this._hash = new s.init([1732584193, 4023233417, 2562383102, 271733878])
			},
			_doProcessBlock: function(t, n) {
				for(var r = 0; 16 > r; r++) {
					var s = n + r,
						l = t[s];
					t[s] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8)
				}
				var r = this._hash.words,
					s = t[n + 0],
					l = t[n + 1],
					p = t[n + 2],
					c = t[n + 3],
					h = t[n + 4],
					u = t[n + 5],
					m = t[n + 6],
					v = t[n + 7],
					f = t[n + 8],
					g = t[n + 9],
					w = t[n + 10],
					b = t[n + 11],
					_ = t[n + 12],
					y = t[n + 13],
					x = t[n + 14],
					D = t[n + 15],
					k = r[0],
					C = r[1],
					$ = r[2],
					M = r[3],
					k = e(k, C, $, M, s, 7, d[0]),
					M = e(M, k, C, $, l, 12, d[1]),
					$ = e($, M, k, C, p, 17, d[2]),
					C = e(C, $, M, k, c, 22, d[3]),
					k = e(k, C, $, M, h, 7, d[4]),
					M = e(M, k, C, $, u, 12, d[5]),
					$ = e($, M, k, C, m, 17, d[6]),
					C = e(C, $, M, k, v, 22, d[7]),
					k = e(k, C, $, M, f, 7, d[8]),
					M = e(M, k, C, $, g, 12, d[9]),
					$ = e($, M, k, C, w, 17, d[10]),
					C = e(C, $, M, k, b, 22, d[11]),
					k = e(k, C, $, M, _, 7, d[12]),
					M = e(M, k, C, $, y, 12, d[13]),
					$ = e($, M, k, C, x, 17, d[14]),
					C = e(C, $, M, k, D, 22, d[15]),
					k = i(k, C, $, M, l, 5, d[16]),
					M = i(M, k, C, $, m, 9, d[17]),
					$ = i($, M, k, C, b, 14, d[18]),
					C = i(C, $, M, k, s, 20, d[19]),
					k = i(k, C, $, M, u, 5, d[20]),
					M = i(M, k, C, $, w, 9, d[21]),
					$ = i($, M, k, C, D, 14, d[22]),
					C = i(C, $, M, k, h, 20, d[23]),
					k = i(k, C, $, M, g, 5, d[24]),
					M = i(M, k, C, $, x, 9, d[25]),
					$ = i($, M, k, C, c, 14, d[26]),
					C = i(C, $, M, k, f, 20, d[27]),
					k = i(k, C, $, M, y, 5, d[28]),
					M = i(M, k, C, $, p, 9, d[29]),
					$ = i($, M, k, C, v, 14, d[30]),
					C = i(C, $, M, k, _, 20, d[31]),
					k = o(k, C, $, M, u, 4, d[32]),
					M = o(M, k, C, $, f, 11, d[33]),
					$ = o($, M, k, C, b, 16, d[34]),
					C = o(C, $, M, k, x, 23, d[35]),
					k = o(k, C, $, M, l, 4, d[36]),
					M = o(M, k, C, $, h, 11, d[37]),
					$ = o($, M, k, C, v, 16, d[38]),
					C = o(C, $, M, k, w, 23, d[39]),
					k = o(k, C, $, M, y, 4, d[40]),
					M = o(M, k, C, $, s, 11, d[41]),
					$ = o($, M, k, C, c, 16, d[42]),
					C = o(C, $, M, k, m, 23, d[43]),
					k = o(k, C, $, M, g, 4, d[44]),
					M = o(M, k, C, $, _, 11, d[45]),
					$ = o($, M, k, C, D, 16, d[46]),
					C = o(C, $, M, k, p, 23, d[47]),
					k = a(k, C, $, M, s, 6, d[48]),
					M = a(M, k, C, $, v, 10, d[49]),
					$ = a($, M, k, C, x, 15, d[50]),
					C = a(C, $, M, k, u, 21, d[51]),
					k = a(k, C, $, M, _, 6, d[52]),
					M = a(M, k, C, $, c, 10, d[53]),
					$ = a($, M, k, C, w, 15, d[54]),
					C = a(C, $, M, k, l, 21, d[55]),
					k = a(k, C, $, M, f, 6, d[56]),
					M = a(M, k, C, $, D, 10, d[57]),
					$ = a($, M, k, C, m, 15, d[58]),
					C = a(C, $, M, k, y, 21, d[59]),
					k = a(k, C, $, M, h, 6, d[60]),
					M = a(M, k, C, $, b, 10, d[61]),
					$ = a($, M, k, C, p, 15, d[62]),
					C = a(C, $, M, k, g, 21, d[63]);
				r[0] = r[0] + k | 0, r[1] = r[1] + C | 0, r[2] = r[2] + $ | 0, r[3] = r[3] + M | 0
			},
			_doFinalize: function() {
				var e = this._data,
					i = e.words,
					o = 8 * this._nDataBytes,
					a = 8 * e.sigBytes;
				i[a >>> 5] |= 128 << 24 - a % 32;
				var n = t.floor(o / 4294967296);
				for(i[(a + 64 >>> 9 << 4) + 15] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8), i[(a + 64 >>> 9 << 4) + 14] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e.sigBytes = 4 * (i.length + 1), this._process(), e = this._hash, i = e.words, o = 0; 4 > o; o++) a = i[o], i[o] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8);
				return e
			},
			clone: function() {
				var t = l.clone.call(this);
				return t._hash = this._hash.clone(), t
			}
		}), n.MD5 = l._createHelper(r), n.HmacMD5 = l._createHmacHelper(r)
	}(Math), ! function(t, e) {
		"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.Cropper = e()
	}(this, function() {
		"use strict";

		function t(t) {
			return se.call(t).slice(8, -1).toLowerCase()
		}

		function e(t) {
			return "number" == typeof t && !isNaN(t)
		}

		function i(t) {
			return "undefined" == typeof t
		}

		function o(t) {
			return "object" === ("undefined" == typeof t ? "undefined" : Z(t)) && null !== t
		}

		function a(t) {
			if(!o(t)) return !1;
			try {
				var e = t.constructor,
					i = e.prototype;
				return e && i && le.call(i, "isPrototypeOf")
			} catch(a) {
				return !1
			}
		}

		function n(e) {
			return "function" === t(e)
		}

		function r(e) {
			return Array.isArray ? Array.isArray(e) : "array" === t(e)
		}

		function s(t) {
			return "string" == typeof t && (t = t.trim ? t.trim() : t.replace(ie, "$1")), t
		}

		function l(t, i) {
			if(t && n(i)) {
				var a = void 0;
				if(r(t) || e(t.length)) {
					var s = t.length;
					for(a = 0; s > a && i.call(t, t[a], a, t) !== !1; a++);
				} else o(t) && Object.keys(t).forEach(function(e) {
					i.call(t, t[e], e, t)
				})
			}
			return t
		}

		function d(t) {
			for(var e = arguments.length, i = Array(e > 1 ? e - 1 : 0), a = 1; e > a; a++) i[a - 1] = arguments[a];
			if(o(t) && i.length > 0) {
				if(Object.assign) return Object.assign.apply(Object, [t].concat(i));
				i.forEach(function(e) {
					o(e) && Object.keys(e).forEach(function(i) {
						t[i] = e[i]
					})
				})
			}
			return t
		}

		function p(t, e) {
			for(var i = arguments.length, o = Array(i > 2 ? i - 2 : 0), a = 2; i > a; a++) o[a - 2] = arguments[a];
			return function() {
				for(var i = arguments.length, a = Array(i), n = 0; i > n; n++) a[n] = arguments[n];
				return t.apply(e, o.concat(a))
			}
		}

		function c(t, i) {
			var o = t.style;
			l(i, function(t, i) {
				ee.test(i) && e(t) && (t += "px"), o[i] = t
			})
		}

		function h(t, e) {
			return t.classList ? t.classList.contains(e) : t.className.indexOf(e) > -1
		}

		function u(t, i) {
			if(i) {
				if(e(t.length)) return l(t, function(t) {
					u(t, i)
				}), void 0;
				if(t.classList) return t.classList.add(i), void 0;
				var o = s(t.className);
				o ? o.indexOf(i) < 0 && (t.className = o + " " + i) : t.className = i
			}
		}

		function m(t, i) {
			return i ? e(t.length) ? (l(t, function(t) {
				m(t, i)
			}), void 0) : t.classList ? (t.classList.remove(i), void 0) : (t.className.indexOf(i) >= 0 && (t.className = t.className.replace(i, "")), void 0) : void 0
		}

		function v(t, i, o) {
			return i ? e(t.length) ? (l(t, function(t) {
				v(t, i, o)
			}), void 0) : (o ? u(t, i) : m(t, i), void 0) : void 0
		}

		function f(t) {
			return t.replace(K, "$1-$2").toLowerCase()
		}

		function g(t, e) {
			return o(t[e]) ? t[e] : t.dataset ? t.dataset[e] : t.getAttribute("data-" + f(e))
		}

		function w(t, e, i) {
			o(i) ? t[e] = i : t.dataset ? t.dataset[e] = i : t.setAttribute("data-" + f(e), i)
		}

		function b(t, e) {
			if(o(t[e])) delete t[e];
			else if(t.dataset) try {
				delete t.dataset[e]
			} catch(i) {
				t.dataset[e] = null
			} else t.removeAttribute("data-" + f(e))
		}

		function _(t, e, i) {
			var o = s(e).split(te);
			return o.length > 1 ? (l(o, function(e) {
				_(t, e, i)
			}), void 0) : (t.removeEventListener ? t.removeEventListener(e, i, !1) : t.detachEvent && t.detachEvent("on" + e, i), void 0)
		}

		function y(t, e, i, o) {
			var a = s(e).split(te),
				n = i;
			return a.length > 1 ? (l(a, function(e) {
				y(t, e, i)
			}), void 0) : (o && (i = function() {
				for(var o = arguments.length, a = Array(o), r = 0; o > r; r++) a[r] = arguments[r];
				return _(t, e, i), n.apply(t, a)
			}), t.addEventListener ? t.addEventListener(e, i, !1) : t.attachEvent && t.attachEvent("on" + e, i), void 0)
		}

		function x(t, e, o) {
			if(t.dispatchEvent) {
				var a = void 0;
				return n(Event) && n(CustomEvent) ? a = i(o) ? new Event(e, {
					bubbles: !0,
					cancelable: !0
				}) : new CustomEvent(e, {
					detail: o,
					bubbles: !0,
					cancelable: !0
				}) : i(o) ? (a = document.createEvent("Event"), a.initEvent(e, !0, !0)) : (a = document.createEvent("CustomEvent"), a.initCustomEvent(e, !0, !0, o)), t.dispatchEvent(a)
			}
			return t.fireEvent ? t.fireEvent("on" + e) : !0
		}

		function D(t) {
			var i = t || window.event;
			if(i.target || (i.target = i.srcElement || document), !e(i.pageX) && e(i.clientX)) {
				var o = t.target.ownerDocument || document,
					a = o.documentElement,
					n = o.body;
				i.pageX = i.clientX + ((a && a.scrollLeft || n && n.scrollLeft || 0) - (a && a.clientLeft || n && n.clientLeft || 0)), i.pageY = i.clientY + ((a && a.scrollTop || n && n.scrollTop || 0) - (a && a.clientTop || n && n.clientTop || 0))
			}
			return i
		}

		function k(t) {
			var e = document.documentElement,
				i = t.getBoundingClientRect();
			return {
				left: i.left + ((window.scrollX || e && e.scrollLeft || 0) - (e && e.clientLeft || 0)),
				top: i.top + ((window.scrollY || e && e.scrollTop || 0) - (e && e.clientTop || 0))
			}
		}

		function C(t, e) {
			return t.getElementsByTagName(e)
		}

		function $(t, e) {
			return t.getElementsByClassName ? t.getElementsByClassName(e) : t.querySelectorAll("." + e)
		}

		function M(t) {
			return document.createElement(t)
		}

		function T(t, e) {
			t.appendChild(e)
		}

		function P(t) {
			t.parentNode && t.parentNode.removeChild(t)
		}

		function B(t) {
			for(; t.firstChild;) t.removeChild(t.firstChild)
		}

		function A(t) {
			var e = t.match(Q);
			return e && (e[1] !== location.protocol || e[2] !== location.hostname || e[3] !== location.port)
		}

		function j(t) {
			var e = "timestamp=" + (new Date).getTime();
			return t + (-1 === t.indexOf("?") ? "?" : "&") + e
		}

		function U(t, e) {
			if(t.naturalWidth && !ne) return e(t.naturalWidth, t.naturalHeight), void 0;
			var i = M("img");
			i.onload = function() {
				e(this.width, this.height)
			}, i.src = t.src
		}

		function z(t) {
			var i = [],
				o = t.translateX,
				a = t.translateY,
				n = t.rotate,
				r = t.scaleX,
				s = t.scaleY;
			e(o) && 0 !== o && i.push("translateX(" + o + "px)"), e(a) && 0 !== a && i.push("translateY(" + a + "px)"), e(n) && 0 !== n && i.push("rotate(" + n + "deg)"), e(r) && 1 !== r && i.push("scaleX(" + r + ")"), e(s) && 1 !== s && i.push("scaleY(" + s + ")");
			var l = i.length ? i.join(" ") : "none";
			return {
				WebkitTransform: l,
				msTransform: l,
				transform: l
			}
		}

		function L(t, e) {
			var i = Math.abs(t.degree) % 180,
				o = (i > 90 ? 180 - i : i) * Math.PI / 180,
				a = Math.sin(o),
				n = Math.cos(o),
				r = t.width,
				s = t.height,
				l = t.aspectRatio,
				d = void 0,
				p = void 0;
			return e ? (d = r / (n + a / l), p = d / l) : (d = r * n + s * a, p = r * a + s * n), {
				width: d,
				height: p
			}
		}

		function E(t, i) {
			var o = M("canvas"),
				a = o.getContext("2d"),
				n = 0,
				r = 0,
				s = i.naturalWidth,
				l = i.naturalHeight,
				d = i.rotate,
				p = i.scaleX,
				c = i.scaleY,
				h = e(p) && e(c) && (1 !== p || 1 !== c),
				u = e(d) && 0 !== d,
				m = u || h,
				v = s * Math.abs(p || 1),
				f = l * Math.abs(c || 1),
				g = void 0,
				w = void 0,
				b = void 0;
			return h && (g = v / 2, w = f / 2), u && (b = L({
				width: v,
				height: f,
				degree: d
			}), v = b.width, f = b.height, g = v / 2, w = f / 2), o.width = v, o.height = f, m && (n = -s / 2, r = -l / 2, a.save(), a.translate(g, w)), u && a.rotate(d * Math.PI / 180), h && a.scale(p, c), a.drawImage(t, Math.floor(n), Math.floor(r), Math.floor(s), Math.floor(l)), m && a.restore(), o
		}

		function S(t, e, i) {
			var o = "",
				a = e;
			for(i += e; i > a; a++) o += de(t.getUint8(a));
			return o
		}

		function F(t) {
			var e = new DataView(t),
				i = e.byteLength,
				o = void 0,
				a = void 0,
				n = void 0,
				r = void 0,
				s = void 0,
				l = void 0,
				d = void 0,
				p = void 0,
				c = void 0,
				h = void 0;
			if(255 === e.getUint8(0) && 216 === e.getUint8(1))
				for(c = 2; i > c;) {
					if(255 === e.getUint8(c) && 225 === e.getUint8(c + 1)) {
						d = c;
						break
					}
					c++
				}
			if(d && (a = d + 4, n = d + 10, "Exif" === S(e, a, 4) && (l = e.getUint16(n), s = 18761 === l, (s || 19789 === l) && 42 === e.getUint16(n + 2, s) && (r = e.getUint32(n + 4, s), r >= 8 && (p = n + r)))), p)
				for(i = e.getUint16(p, s), h = 0; i > h; h++)
					if(c = p + 12 * h + 2, 274 === e.getUint16(c, s)) {
						c += 8, o = e.getUint16(c, s), ne && e.setUint16(c, 1, s);
						break
					}
			return o
		}

		function I(t) {
			var e = t.replace(J, "");
			e = e.replace(G, "");
			var i = window.atob(e),
				o = i.length,
				a = new ArrayBuffer(o),
				n = new Uint8Array(a),
				r = void 0;
			for(r = 0; o > r; r++) n[r] = i.charCodeAt(r);
			return a
		}

		function O(t) {
			var e = new Uint8Array(t),
				i = e.length,
				o = "",
				a = void 0;
			for(a = 0; i > a; a++) o += de(e[a]);
			return "data:image/jpeg;base64," + btoa(o)
		}

		function R(t, e) {
			var i = t.pageX,
				o = t.pageY,
				a = {
					endX: i,
					endY: o
				};
			return e ? a : d({
				startX: i,
				startY: o
			}, a)
		}

		function H(t) {
			var e = d({}, t),
				i = [];
			return l(t, function(t, o) {
				delete e[o], l(e, function(e) {
					var o = Math.abs(t.startX - e.startX),
						a = Math.abs(t.startY - e.startY),
						n = Math.abs(t.endX - e.endX),
						r = Math.abs(t.endY - e.endY),
						s = Math.sqrt(o * o + a * a),
						l = Math.sqrt(n * n + r * r),
						d = (l - s) / s;
					i.push(d)
				})
			}), i.sort(function(t, e) {
				return Math.abs(t) < Math.abs(e)
			}), i[0]
		}

		function N(t) {
			var e = 0,
				i = 0,
				o = 0;
			return l(t, function(t) {
				var a = t.startX,
					n = t.startY;
				e += a, i += n, o += 1
			}), e /= o, i /= o, {
				pageX: e,
				pageY: i
			}
		}
		var V = {
				viewMode: 0,
				dragMode: "crop",
				aspectRatio: 0 / 0,
				data: null,
				preview: "",
				responsive: !0,
				restore: !0,
				checkCrossOrigin: !0,
				checkOrientation: !0,
				modal: !0,
				guides: !0,
				center: !0,
				highlight: !0,
				background: !0,
				autoCrop: !0,
				autoCropArea: .8,
				movable: !0,
				rotatable: !0,
				scalable: !0,
				zoomable: !0,
				zoomOnTouch: !0,
				zoomOnWheel: !0,
				wheelZoomRatio: .1,
				cropBoxMovable: !0,
				cropBoxResizable: !0,
				toggleDragModeOnDblclick: !0,
				minCanvasWidth: 0,
				minCanvasHeight: 0,
				minCropBoxWidth: 0,
				minCropBoxHeight: 0,
				minContainerWidth: 200,
				minContainerHeight: 100,
				ready: null,
				cropstart: null,
				cropmove: null,
				cropend: null,
				crop: null,
				zoom: null
			},
			W = '<div class="cropper-container"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-action="e"></span><span class="cropper-line line-n" data-action="n"></span><span class="cropper-line line-w" data-action="w"></span><span class="cropper-line line-s" data-action="s"></span><span class="cropper-point point-e" data-action="e"></span><span class="cropper-point point-n" data-action="n"></span><span class="cropper-point point-w" data-action="w"></span><span class="cropper-point point-s" data-action="s"></span><span class="cropper-point point-ne" data-action="ne"></span><span class="cropper-point point-nw" data-action="nw"></span><span class="cropper-point point-sw" data-action="sw"></span><span class="cropper-point point-se" data-action="se"></span></div></div>',
			Z = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
				return typeof t
			} : function(t) {
				return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
			},
			X = function(t, e) {
				if(!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
			},
			Y = function() {
				function t(t, e) {
					for(var i = 0; i < e.length; i++) {
						var o = e[i];
						o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o)
					}
				}
				return function(e, i, o) {
					return i && t(e.prototype, i), o && t(e, o), e
				}
			}(),
			q = function(t) {
				if(Array.isArray(t)) {
					for(var e = 0, i = Array(t.length); e < t.length; e++) i[e] = t[e];
					return i
				}
				return Array.from(t)
			},
			J = /^data:.*,/,
			G = /\s/g,
			K = /([a-z\d])([A-Z])/g,
			Q = /^(https?:)\/\/([^:/?#]+):?(\d*)/i,
			te = /\s+/,
			ee = /^(width|height|left|top|marginLeft|marginTop)$/,
			ie = /^\s+(.*)\s+$/,
			oe = /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i,
			ae = "undefined" != typeof window ? window.navigator : null,
			ne = ae && oe.test(ae.userAgent),
			re = Object.prototype,
			se = re.toString,
			le = re.hasOwnProperty,
			de = (Array.prototype.slice, String.fromCharCode),
			pe = {
				render: function() {
					var t = this;
					t.initContainer(), t.initCanvas(), t.initCropBox(), t.renderCanvas(), t.cropped && t.renderCropBox()
				},
				initContainer: function() {
					var t = this,
						e = t.options,
						i = t.element,
						o = t.container,
						a = t.cropper,
						n = "cropper-hidden",
						r = void 0;
					u(a, n), m(i, n), t.containerData = r = {
						width: Math.max(o.offsetWidth, Number(e.minContainerWidth) || 200),
						height: Math.max(o.offsetHeight, Number(e.minContainerHeight) || 100)
					}, c(a, {
						width: r.width,
						height: r.height
					}), u(i, n), m(a, n)
				},
				initCanvas: function() {
					var t = this,
						e = t.options.viewMode,
						i = t.containerData,
						o = t.imageData,
						a = 90 === Math.abs(o.rotate),
						n = a ? o.naturalHeight : o.naturalWidth,
						r = a ? o.naturalWidth : o.naturalHeight,
						s = n / r,
						l = i.width,
						p = i.height;
					i.height * s > i.width ? 3 === e ? l = i.height * s : p = i.width / s : 3 === e ? p = i.width / s : l = i.height * s;
					var c = {
						naturalWidth: n,
						naturalHeight: r,
						aspectRatio: s,
						width: l,
						height: p
					};
					c.oldLeft = c.left = (i.width - l) / 2, c.oldTop = c.top = (i.height - p) / 2, t.canvasData = c, t.limited = 1 === e || 2 === e, t.limitCanvas(!0, !0), t.initialImageData = d({}, o), t.initialCanvasData = d({}, c)
				},
				limitCanvas: function(t, e) {
					var i = this,
						o = i.options,
						a = o.viewMode,
						n = i.containerData,
						r = i.canvasData,
						s = r.aspectRatio,
						l = i.cropBoxData,
						d = i.cropped && l;
					if(t) {
						var p = Number(o.minCanvasWidth) || 0,
							c = Number(o.minCanvasHeight) || 0;
						a > 1 ? (p = Math.max(p, n.width), c = Math.max(c, n.height), 3 === a && (c * s > p ? p = c * s : c = p / s)) : a > 0 && (p ? p = Math.max(p, d ? l.width : 0) : c ? c = Math.max(c, d ? l.height : 0) : d && (p = l.width, c = l.height, c * s > p ? p = c * s : c = p / s)), p && c ? c * s > p ? c = p / s : p = c * s : p ? c = p / s : c && (p = c * s), r.minWidth = p, r.minHeight = c, r.maxWidth = 1 / 0, r.maxHeight = 1 / 0
					}
					if(e)
						if(a) {
							var h = n.width - r.width,
								u = n.height - r.height;
							r.minLeft = Math.min(0, h), r.minTop = Math.min(0, u), r.maxLeft = Math.max(0, h), r.maxTop = Math.max(0, u), d && i.limited && (r.minLeft = Math.min(l.left, l.left + (l.width - r.width)), r.minTop = Math.min(l.top, l.top + (l.height - r.height)), r.maxLeft = l.left, r.maxTop = l.top, 2 === a && (r.width >= n.width && (r.minLeft = Math.min(0, h), r.maxLeft = Math.max(0, h)), r.height >= n.height && (r.minTop = Math.min(0, u), r.maxTop = Math.max(0, u))))
						} else r.minLeft = -r.width, r.minTop = -r.height, r.maxLeft = n.width, r.maxTop = n.height
				},
				renderCanvas: function(t) {
					var e = this,
						i = e.canvasData,
						o = e.imageData,
						a = o.rotate;
					if(e.rotated) {
						e.rotated = !1;
						var n = L({
								width: o.width,
								height: o.height,
								degree: a
							}),
							r = n.width / n.height,
							s = 1 === o.aspectRatio;
						if(s || r !== i.aspectRatio) {
							if(i.left -= (n.width - i.width) / 2, i.top -= (n.height - i.height) / 2, i.width = n.width, i.height = n.height, i.aspectRatio = r, i.naturalWidth = o.naturalWidth, i.naturalHeight = o.naturalHeight, s && a % 90 || a % 180) {
								var l = L({
									width: o.naturalWidth,
									height: o.naturalHeight,
									degree: a
								});
								i.naturalWidth = l.width, i.naturalHeight = l.height
							}
							e.limitCanvas(!0, !1)
						}
					}(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), e.limitCanvas(!1, !0), i.oldLeft = i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.oldTop = i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), c(e.canvas, d({
						width: i.width,
						height: i.height
					}, z({
						translateX: i.left,
						translateY: i.top
					}))), e.renderImage(), e.cropped && e.limited && e.limitCropBox(!0, !0), t && e.output()
				},
				renderImage: function(t) {
					var e = this,
						i = e.canvasData,
						o = e.imageData,
						a = void 0,
						n = void 0,
						r = void 0,
						s = void 0;
					o.rotate && (n = L({
						width: i.width,
						height: i.height,
						degree: o.rotate,
						aspectRatio: o.aspectRatio
					}, !0), r = n.width, s = n.height, a = {
						width: r,
						height: s,
						left: (i.width - r) / 2,
						top: (i.height - s) / 2
					}), d(o, a || {
						width: i.width,
						height: i.height,
						left: 0,
						top: 0
					}), c(e.image, d({
						width: o.width,
						height: o.height
					}, z(d({
						translateX: o.left,
						translateY: o.top
					}, o)))), t && e.output()
				},
				initCropBox: function() {
					var t = this,
						e = t.options,
						i = e.aspectRatio,
						o = Number(e.autoCropArea) || .8,
						a = t.canvasData,
						n = {
							width: a.width,
							height: a.height
						};
					i && (a.height * i > a.width ? n.height = n.width / i : n.width = n.height * i), t.cropBoxData = n, t.limitCropBox(!0, !0), n.width = Math.min(Math.max(n.width, n.minWidth), n.maxWidth), n.height = Math.min(Math.max(n.height, n.minHeight), n.maxHeight), n.width = Math.max(n.minWidth, n.width * o), n.height = Math.max(n.minHeight, n.height * o), n.oldLeft = n.left = a.left + (a.width - n.width) / 2, n.oldTop = n.top = a.top + (a.height - n.height) / 2, t.initialCropBoxData = d({}, n)
				},
				limitCropBox: function(t, e) {
					var i = this,
						o = i.options,
						a = o.aspectRatio,
						n = i.containerData,
						r = i.canvasData,
						s = i.cropBoxData,
						l = i.limited;
					if(t) {
						var d = Number(o.minCropBoxWidth) || 0,
							p = Number(o.minCropBoxHeight) || 0,
							c = Math.min(n.width, l ? r.width : n.width),
							h = Math.min(n.height, l ? r.height : n.height);
						d = Math.min(d, n.width), p = Math.min(p, n.height), a && (d && p ? p * a > d ? p = d / a : d = p * a : d ? p = d / a : p && (d = p * a), h * a > c ? h = c / a : c = h * a), s.minWidth = Math.min(d, c), s.minHeight = Math.min(p, h), s.maxWidth = c, s.maxHeight = h
					}
					e && (l ? (s.minLeft = Math.max(0, r.left), s.minTop = Math.max(0, r.top), s.maxLeft = Math.min(n.width, r.left + r.width) - s.width, s.maxTop = Math.min(n.height, r.top + r.height) - s.height) : (s.minLeft = 0, s.minTop = 0, s.maxLeft = n.width - s.width, s.maxTop = n.height - s.height))
				},
				renderCropBox: function() {
					var t = this,
						e = t.options,
						i = t.containerData,
						o = t.cropBoxData;
					(o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), t.limitCropBox(!1, !0), o.oldLeft = o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.oldTop = o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), e.movable && e.cropBoxMovable && w(t.face, "action", o.width === i.width && o.height === i.height ? "move" : "all"), c(t.cropBox, d({
						width: o.width,
						height: o.height
					}, z({
						translateX: o.left,
						translateY: o.top
					}))), t.cropped && t.limited && t.limitCanvas(!0, !0), t.disabled || t.output()
				},
				output: function() {
					var t = this;
					t.preview(), t.complete && x(t.element, "crop", t.getData())
				}
			},
			ce = "preview",
			he = {
				initPreview: function() {
					var t = this,
						e = t.options.preview,
						i = M("img"),
						o = t.crossOrigin,
						a = o ? t.crossOriginUrl : t.url;
					if(o && (i.crossOrigin = o), i.src = a, T(t.viewBox, i), t.image2 = i, e) {
						var n = e.querySelector ? [e] : document.querySelectorAll(e);
						t.previews = n, l(n, function(t) {
							var e = M("img");
							console.log("preview will show"), w(t, ce, {
								width: t.offsetWidth,
								height: t.offsetHeight,
								html: t.innerHTML
							}), o && (e.crossOrigin = o), e.src = a, e.style.cssText = 'display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"', B(t), T(t, e)
						})
					}
				},
				resetPreview: function() {
					l(this.previews, function(t) {
						var e = g(t, ce);
						c(t, {
							width: e.width,
							height: e.height
						}), t.innerHTML = e.html, b(t, ce)
					})
				},
				preview: function() {
					var t = this,
						e = t.imageData,
						i = t.canvasData,
						o = t.cropBoxData,
						a = o.width,
						n = o.height,
						r = e.width,
						s = e.height,
						p = o.left - i.left - e.left,
						h = o.top - i.top - e.top;
					t.cropped && !t.disabled && (c(t.image2, d({
						width: r,
						height: s
					}, z(d({
						translateX: -p,
						translateY: -h
					}, e)))), l(t.previews, function(t) {
						var i = g(t, ce),
							o = i.width,
							l = i.height,
							u = o,
							m = l,
							v = 1;
						a && (v = o / a, m = n * v), n && m > l && (v = l / n, u = a * v, m = l), c(t, {
							width: u,
							height: m
						}), c(C(t, "img")[0], d({
							width: r * v,
							height: s * v
						}, z(d({
							translateX: -p * v,
							translateY: -h * v
						}, e))))
					}))
				}
			},
			ue = "undefined" != typeof window ? window.PointerEvent : null,
			me = ue ? "pointerdown" : "touchstart mousedown",
			ve = ue ? "pointermove" : "touchmove mousemove",
			fe = ue ? " pointerup pointercancel" : "touchend touchcancel mouseup",
			ge = "wheel mousewheel DOMMouseScroll",
			we = "dblclick",
			be = "resize",
			_e = "cropstart",
			ye = "cropmove",
			xe = "cropend",
			De = "crop",
			ke = "zoom",
			Ce = {
				bind: function() {
					var t = this,
						e = t.options,
						i = t.element,
						o = t.cropper;
					n(e.cropstart) && y(i, _e, e.cropstart), n(e.cropmove) && y(i, ye, e.cropmove), n(e.cropend) && y(i, xe, e.cropend), n(e.crop) && y(i, De, e.crop), n(e.zoom) && y(i, ke, e.zoom), y(o, me, t.onCropStart = p(t.cropStart, t)), e.zoomable && e.zoomOnWheel && y(o, ge, t.onWheel = p(t.wheel, t)), e.toggleDragModeOnDblclick && y(o, we, t.onDblclick = p(t.dblclick, t)), y(document, ve, t.onCropMove = p(t.cropMove, t)), y(document, fe, t.onCropEnd = p(t.cropEnd, t)), e.responsive && y(window, be, t.onResize = p(t.resize, t))
				},
				unbind: function() {
					var t = this,
						e = t.options,
						i = t.element,
						o = t.cropper;
					n(e.cropstart) && _(i, _e, e.cropstart), n(e.cropmove) && _(i, ye, e.cropmove), n(e.cropend) && _(i, xe, e.cropend), n(e.crop) && _(i, De, e.crop), n(e.zoom) && _(i, ke, e.zoom), _(o, me, t.onCropStart), e.zoomable && e.zoomOnWheel && _(o, ge, t.onWheel), e.toggleDragModeOnDblclick && _(o, we, t.onDblclick), _(document, ve, t.onCropMove), _(document, fe, t.onCropEnd), e.responsive && _(window, be, t.onResize)
				}
			},
			$e = /^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/,
			Me = {
				resize: function() {
					var t = this,
						e = t.options.restore,
						i = t.container,
						o = t.containerData;
					if(!t.disabled && o) {
						var a = i.offsetWidth / o.width,
							n = void 0,
							r = void 0;
						(1 !== a || i.offsetHeight !== o.height) && (e && (n = t.getCanvasData(), r = t.getCropBoxData()), t.render(), e && (t.setCanvasData(l(n, function(t, e) {
							n[e] = t * a
						})), t.setCropBoxData(l(r, function(t, e) {
							r[e] = t * a
						}))))
					}
				},
				dblclick: function() {
					var t = this;
					t.disabled || t.setDragMode(h(t.dragBox, "cropper-crop") ? "move" : "crop")
				},
				wheel: function(t) {
					var e = this,
						i = D(t),
						o = Number(e.options.wheelZoomRatio) || .1,
						a = 1;
					e.disabled || (i.preventDefault(), e.wheeling || (e.wheeling = !0, setTimeout(function() {
						e.wheeling = !1
					}, 50), i.deltaY ? a = i.deltaY > 0 ? 1 : -1 : i.wheelDelta ? a = -i.wheelDelta / 120 : i.detail && (a = i.detail > 0 ? 1 : -1), e.zoom(-a * o, i)))
				},
				cropStart: function(t) {
					var e = this;
					if(!e.disabled) {
						var i = e.options,
							o = e.pointers,
							a = D(t),
							n = void 0;
						if(a.changedTouches ? l(a.changedTouches, function(t) {
								o[t.identifier] = R(t)
							}) : o[a.pointerId || 0] = R(a), n = Object.keys(o).length > 1 && i.zoomable && i.zoomOnTouch ? "zoom" : g(a.target, "action"), $e.test(n)) {
							if(x(e.element, "cropstart", {
									originalEvent: a,
									action: n
								}) === !1) return;
							a.preventDefault(), e.action = n, e.cropping = !1, "crop" === n && (e.cropping = !0, u(e.dragBox, "cropper-modal"))
						}
					}
				},
				cropMove: function(t) {
					var e = this,
						i = e.action;
					if(!e.disabled && i) {
						var o = e.pointers,
							a = D(t);
						a.preventDefault(), x(e.element, "cropmove", {
							originalEvent: a,
							action: i
						}) !== !1 && (a.changedTouches ? l(a.changedTouches, function(t) {
							d(o[t.identifier], R(t, !0))
						}) : d(o[a.pointerId || 0], R(a, !0)), e.change(a))
					}
				},
				cropEnd: function(t) {
					var e = this,
						i = e.action;
					if(!e.disabled && i) {
						var o = e.pointers,
							a = D(t);
						a.preventDefault(), a.changedTouches ? l(a.changedTouches, function(t) {
							delete o[t.identifier]
						}) : delete o[a.pointerId || 0], Object.keys(o).length || (e.action = ""), e.cropping && (e.cropping = !1, v(e.dragBox, "cropper-modal", e.cropped && this.options.modal)), x(e.element, "cropend", {
							originalEvent: a,
							action: i
						})
					}
				}
			},
			Te = "e",
			Pe = "w",
			Be = "s",
			Ae = "n",
			je = "se",
			Ue = "sw",
			ze = "ne",
			Le = "nw",
			Ee = {
				change: function(t) {
					var e = this,
						i = e.options,
						o = e.containerData,
						a = e.canvasData,
						n = e.cropBoxData,
						r = i.aspectRatio,
						s = e.action,
						d = n.width,
						p = n.height,
						c = n.left,
						h = n.top,
						u = c + d,
						v = h + p,
						f = 0,
						g = 0,
						w = o.width,
						b = o.height,
						_ = !0,
						y = void 0;
					!r && t.shiftKey && (r = d && p ? d / p : 1), e.limited && (f = n.minLeft, g = n.minTop, w = f + Math.min(o.width, a.width, a.left + a.width), b = g + Math.min(o.height, a.height, a.top + a.height));
					var x = e.pointers,
						D = x[Object.keys(x)[0]],
						C = {
							x: D.endX - D.startX,
							y: D.endY - D.startY
						};
					switch(r && (C.X = C.y * r, C.Y = C.x / r), s) {
						case "all":
							c += C.x, h += C.y;
							break;
						case Te:
							if(C.x >= 0 && (u >= w || r && (g >= h || v >= b))) {
								_ = !1;
								break
							}
							d += C.x, r && (p = d / r, h -= C.Y / 2), 0 > d && (s = Pe, d = 0);
							break;
						case Ae:
							if(C.y <= 0 && (g >= h || r && (f >= c || u >= w))) {
								_ = !1;
								break
							}
							p -= C.y, h += C.y, r && (d = p * r, c += C.X / 2), 0 > p && (s = Be, p = 0);
							break;
						case Pe:
							if(C.x <= 0 && (f >= c || r && (g >= h || v >= b))) {
								_ = !1;
								break
							}
							d -= C.x, c += C.x, r && (p = d / r, h += C.Y / 2), 0 > d && (s = Te, d = 0);
							break;
						case Be:
							if(C.y >= 0 && (v >= b || r && (f >= c || u >= w))) {
								_ = !1;
								break
							}
							p += C.y, r && (d = p * r, c -= C.X / 2), 0 > p && (s = Ae, p = 0);
							break;
						case ze:
							if(r) {
								if(C.y <= 0 && (g >= h || u >= w)) {
									_ = !1;
									break
								}
								p -= C.y, h += C.y, d = p * r
							} else C.x >= 0 ? w > u ? d += C.x : C.y <= 0 && g >= h && (_ = !1) : d += C.x, C.y <= 0 ? h > g && (p -= C.y, h += C.y) : (p -= C.y, h += C.y);
							0 > d && 0 > p ? (s = Ue, p = 0, d = 0) : 0 > d ? (s = Le, d = 0) : 0 > p && (s = je, p = 0);
							break;
						case Le:
							if(r) {
								if(C.y <= 0 && (g >= h || f >= c)) {
									_ = !1;
									break
								}
								p -= C.y, h += C.y, d = p * r, c += C.X
							} else C.x <= 0 ? c > f ? (d -= C.x, c += C.x) : C.y <= 0 && g >= h && (_ = !1) : (d -= C.x, c += C.x), C.y <= 0 ? h > g && (p -= C.y, h += C.y) : (p -= C.y, h += C.y);
							0 > d && 0 > p ? (s = je, p = 0, d = 0) : 0 > d ? (s = ze, d = 0) : 0 > p && (s = Ue, p = 0);
							break;
						case Ue:
							if(r) {
								if(C.x <= 0 && (f >= c || v >= b)) {
									_ = !1;
									break
								}
								d -= C.x, c += C.x, p = d / r
							} else C.x <= 0 ? c > f ? (d -= C.x, c += C.x) : C.y >= 0 && v >= b && (_ = !1) : (d -= C.x, c += C.x), C.y >= 0 ? b > v && (p += C.y) : p += C.y;
							0 > d && 0 > p ? (s = ze, p = 0, d = 0) : 0 > d ? (s = je, d = 0) : 0 > p && (s = Le, p = 0);
							break;
						case je:
							if(r) {
								if(C.x >= 0 && (u >= w || v >= b)) {
									_ = !1;
									break
								}
								d += C.x, p = d / r
							} else C.x >= 0 ? w > u ? d += C.x : C.y >= 0 && v >= b && (_ = !1) : d += C.x, C.y >= 0 ? b > v && (p += C.y) : p += C.y;
							0 > d && 0 > p ? (s = Le, p = 0, d = 0) : 0 > d ? (s = Ue, d = 0) : 0 > p && (s = ze, p = 0);
							break;
						case "move":
							e.move(C.x, C.y), _ = !1;
							break;
						case "zoom":
							e.zoom(H(x), t), _ = !1;
							break;
						case "crop":
							if(!C.x || !C.y) {
								_ = !1;
								break
							}
							y = k(e.cropper), c = D.startX - y.left, h = D.startY - y.top, d = n.minWidth, p = n.minHeight, C.x > 0 ? s = C.y > 0 ? je : ze : C.x < 0 && (c -= d, s = C.y > 0 ? Ue : Le), C.y < 0 && (h -= p), e.cropped || (m(e.cropBox, "cropper-hidden"), e.cropped = !0, e.limited && e.limitCropBox(!0, !0))
					}
					_ && (n.width = d, n.height = p, n.left = c, n.top = h, e.action = s, e.renderCropBox()), l(x, function(t) {
						t.startX = t.endX, t.startY = t.endY
					})
				}
			},
			Se = {
				crop: function() {
					var t = this;
					return t.ready && !t.disabled && (t.cropped || (t.cropped = !0, t.limitCropBox(!0, !0), t.options.modal && u(t.dragBox, "cropper-modal"), m(t.cropBox, "cropper-hidden")), t.setCropBoxData(t.initialCropBoxData)), t
				},
				reset: function() {
					var t = this;
					return t.ready && !t.disabled && (t.imageData = d({}, t.initialImageData), t.canvasData = d({}, t.initialCanvasData), t.cropBoxData = d({}, t.initialCropBoxData), t.renderCanvas(), t.cropped && t.renderCropBox()), t
				},
				clear: function() {
					var t = this;
					return t.cropped && !t.disabled && (d(t.cropBoxData, {
						left: 0,
						top: 0,
						width: 0,
						height: 0
					}), t.cropped = !1, t.renderCropBox(), t.limitCanvas(), t.renderCanvas(), m(t.dragBox, "cropper-modal"), u(t.cropBox, "cropper-hidden")), t
				},
				replace: function(t, e) {
					var i = this;
					return !i.disabled && t && (i.isImg && (i.element.src = t), e ? (i.url = t, i.image.src = t, i.ready && (i.image2.src = t, l(i.previews, function(e) {
						C(e, "img")[0].src = t
					}))) : (i.isImg && (i.replaced = !0), i.options.data = null, i.load(t))), i
				},
				enable: function() {
					var t = this;
					return t.ready && (t.disabled = !1, m(t.cropper, "cropper-disabled")), t
				},
				disable: function() {
					var t = this;
					return t.ready && (t.disabled = !0, u(t.cropper, "cropper-disabled")), t
				},
				destroy: function() {
					var t = this,
						e = t.element,
						i = t.image;
					return t.loaded ? (t.isImg && t.replaced && (e.src = t.originalUrl), t.unbuild(), m(e, "cropper-hidden")) : t.isImg ? _(e, "load", t.onStart) : i && P(i), b(e, "cropper"), t
				},
				move: function(t, e) {
					var o = this,
						a = o.canvasData;
					return o.moveTo(i(t) ? t : a.left + Number(t), i(e) ? e : a.top + Number(e))
				},
				moveTo: function(t, o) {
					var a = this,
						n = a.canvasData,
						r = !1;
					return i(o) && (o = t), t = Number(t), o = Number(o), a.ready && !a.disabled && a.options.movable && (e(t) && (n.left = t, r = !0), e(o) && (n.top = o, r = !0), r && a.renderCanvas(!0)), a
				},
				zoom: function(t, e) {
					var i = this,
						o = i.canvasData;
					return t = Number(t), t = 0 > t ? 1 / (1 - t) : 1 + t, i.zoomTo(o.width * t / o.naturalWidth, e)
				},
				zoomTo: function(t, e) {
					var i = this,
						o = i.options,
						a = i.canvasData,
						n = a.width,
						r = a.height,
						s = a.naturalWidth,
						l = a.naturalHeight;
					if(t = Number(t), t >= 0 && i.ready && !i.disabled && o.zoomable) {
						var d = s * t,
							p = l * t;
						if(x(i.element, "zoom", {
								originalEvent: e,
								oldRatio: n / s,
								ratio: d / s
							}) === !1) return i;
						if(e) {
							var c = i.pointers,
								h = k(i.cropper),
								u = c && Object.keys(c).length ? N(c) : {
									pageX: e.pageX,
									pageY: e.pageY
								};
							a.left -= (d - n) * ((u.pageX - h.left - a.left) / n), a.top -= (p - r) * ((u.pageY - h.top - a.top) / r)
						} else a.left -= (d - n) / 2, a.top -= (p - r) / 2;
						a.width = d, a.height = p, i.renderCanvas(!0)
					}
					return i
				},
				rotate: function(t) {
					var e = this;
					return e.rotateTo((e.imageData.rotate || 0) + Number(t))
				},
				rotateTo: function(t) {
					var i = this;
					return t = Number(t), e(t) && i.ready && !i.disabled && i.options.rotatable && (i.imageData.rotate = t % 360, i.rotated = !0, i.renderCanvas(!0)), i
				},
				scale: function(t, o) {
					var a = this,
						n = a.imageData,
						r = !1;
					return i(o) && (o = t), t = Number(t), o = Number(o), a.ready && !a.disabled && a.options.scalable && (e(t) && (n.scaleX = t, r = !0), e(o) && (n.scaleY = o, r = !0), r && a.renderImage(!0)), a
				},
				scaleX: function(t) {
					var i = this,
						o = i.imageData.scaleY;
					return i.scale(t, e(o) ? o : 1)
				},
				scaleY: function(t) {
					var i = this,
						o = i.imageData.scaleX;
					return i.scale(e(o) ? o : 1, t)
				},
				getData: function(t) {
					var e = this,
						i = e.options,
						o = e.imageData,
						a = e.canvasData,
						n = e.cropBoxData,
						r = void 0,
						s = void 0;
					return e.ready && e.cropped ? (s = {
						x: n.left - a.left,
						y: n.top - a.top,
						width: n.width,
						height: n.height
					}, r = o.width / o.naturalWidth, l(s, function(e, i) {
						e /= r, s[i] = t ? Math.round(e) : e
					})) : s = {
						x: 0,
						y: 0,
						width: 0,
						height: 0
					}, i.rotatable && (s.rotate = o.rotate || 0), i.scalable && (s.scaleX = o.scaleX || 1, s.scaleY = o.scaleY || 1), s
				},
				setData: function(t) {
					var i = this,
						o = i.options,
						r = i.imageData,
						s = i.canvasData,
						l = {},
						d = void 0,
						p = void 0,
						c = void 0;
					return n(t) && (t = t.call(i.element)), i.ready && !i.disabled && a(t) && (o.rotatable && e(t.rotate) && t.rotate !== r.rotate && (r.rotate = t.rotate, i.rotated = d = !0), o.scalable && (e(t.scaleX) && t.scaleX !== r.scaleX && (r.scaleX = t.scaleX, p = !0), e(t.scaleY) && t.scaleY !== r.scaleY && (r.scaleY = t.scaleY, p = !0)), d ? i.renderCanvas() : p && i.renderImage(), c = r.width / r.naturalWidth, e(t.x) && (l.left = t.x * c + s.left), e(t.y) && (l.top = t.y * c + s.top), e(t.width) && (l.width = t.width * c), e(t.height) && (l.height = t.height * c), i.setCropBoxData(l)), i
				},
				getContainerData: function() {
					var t = this;
					return t.ready ? t.containerData : {}
				},
				getImageData: function() {
					var t = this;
					return t.loaded ? t.imageData : {}
				},
				getCanvasData: function() {
					var t = this,
						e = t.canvasData,
						i = {};
					return t.ready && l(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(t) {
						i[t] = e[t]
					}), i
				},
				setCanvasData: function(t) {
					var i = this,
						o = i.canvasData,
						r = o.aspectRatio;
					return n(t) && (t = t.call(i.element)), i.ready && !i.disabled && a(t) && (e(t.left) && (o.left = t.left), e(t.top) && (o.top = t.top), e(t.width) ? (o.width = t.width, o.height = t.width / r) : e(t.height) && (o.height = t.height, o.width = t.height * r), i.renderCanvas(!0)), i
				},
				getCropBoxData: function() {
					var t = this,
						e = t.cropBoxData,
						i = void 0;
					return t.ready && t.cropped && (i = {
						left: e.left,
						top: e.top,
						width: e.width,
						height: e.height
					}), i || {}
				},
				setCropBoxData: function(t) {
					var i = this,
						o = i.cropBoxData,
						r = i.options.aspectRatio,
						s = void 0,
						l = void 0;
					return n(t) && (t = t.call(i.element)), i.ready && i.cropped && !i.disabled && a(t) && (e(t.left) && (o.left = t.left), e(t.top) && (o.top = t.top), e(t.width) && t.width !== o.width && (s = !0, o.width = t.width), e(t.height) && t.height !== o.height && (l = !0, o.height = t.height), r && (s ? o.height = o.width / r : l && (o.width = o.height * r)), i.renderCropBox()), i
				},
				getCroppedCanvas: function(t) {
					var e = this;
					if(!e.ready || !window.HTMLCanvasElement) return null;
					if(!e.cropped) return E(e.image, e.imageData);
					a(t) || (t = {});
					var i = e.getData(),
						o = i.width,
						n = i.height,
						r = o / n,
						s = void 0,
						l = void 0,
						d = void 0;
					a(t) && (s = t.width, l = t.height, s ? (l = s / r, d = s / o) : l && (s = l * r, d = l / n));
					var p = Math.floor(s || o),
						c = Math.floor(l || n),
						h = M("canvas"),
						u = h.getContext("2d");
					h.width = p, h.height = c, t.fillColor && (u.fillStyle = t.fillColor, u.fillRect(0, 0, p, c));
					var m = function() {
						var t = E(e.image, e.imageData),
							a = t.width,
							r = t.height,
							s = e.canvasData,
							l = [t],
							p = i.x + s.naturalWidth * (Math.abs(i.scaleX || 1) - 1) / 2,
							c = i.y + s.naturalHeight * (Math.abs(i.scaleY || 1) - 1) / 2,
							h = void 0,
							u = void 0,
							m = void 0,
							v = void 0,
							f = void 0,
							g = void 0;
						return -o >= p || p > a ? p = h = m = f = 0 : 0 >= p ? (m = -p, p = 0, h = f = Math.min(a, o + p)) : a >= p && (m = 0, h = f = Math.min(o, a - p)), 0 >= h || -n >= c || c > r ? c = u = v = g = 0 : 0 >= c ? (v = -c, c = 0, u = g = Math.min(r, n + c)) : r >= c && (v = 0, u = g = Math.min(n, r - c)), l.push(Math.floor(p), Math.floor(c), Math.floor(h), Math.floor(u)), d && (m *= d, v *= d, f *= d, g *= d), f > 0 && g > 0 && l.push(Math.floor(m), Math.floor(v), Math.floor(f), Math.floor(g)), l
					}();
					return u.drawImage.apply(u, q(m)), h
				},
				setAspectRatio: function(t) {
					var e = this,
						o = e.options;
					return e.disabled || i(t) || (o.aspectRatio = Math.max(0, t) || 0 / 0, e.ready && (e.initCropBox(), e.cropped && e.renderCropBox())), e
				},
				setDragMode: function(t) {
					var e = this,
						i = e.options,
						o = e.dragBox,
						a = e.face,
						n = void 0,
						r = void 0;
					return e.loaded && !e.disabled && (n = "crop" === t, r = i.movable && "move" === t, t = n || r ? t : "none", w(o, "action", t), v(o, "cropper-crop", n), v(o, "cropper-move", r), i.cropBoxMovable || (w(a, "action", t), v(a, "cropper-crop", n), v(a, "cropper-move", r))), e
				}
			},
			Fe = "cropper",
			Ie = Fe + "-hidden",
			Oe = "error",
			Re = "load",
			He = "ready",
			Ne = "crop",
			Ve = /^data:/,
			We = /^data:image\/jpeg;base64,/,
			Ze = void 0,
			Xe = function() {
				function t(e, i) {
					X(this, t);
					var o = this;
					o.element = e, o.options = d({}, V, a(i) && i), o.loaded = !1, o.ready = !1, o.complete = !1, o.rotated = !1, o.cropped = !1, o.disabled = !1, o.replaced = !1, o.limited = !1, o.wheeling = !1, o.isImg = !1, o.originalUrl = "", o.canvasData = null, o.cropBoxData = null, o.previews = null, o.pointers = {}, o.init()
				}
				return Y(t, [{
					key: "init",
					value: function() {
						var t = this,
							e = t.element,
							i = e.tagName.toLowerCase(),
							o = void 0;
						if(!g(e, Fe)) {
							if(w(e, Fe, t), "img" === i) {
								if(t.isImg = !0, t.originalUrl = o = e.getAttribute("src"), !o) return;
								o = e.src
							} else "canvas" === i && window.HTMLCanvasElement && (o = e.toDataURL());
							t.load(o)
						}
					}
				}, {
					key: "load",
					value: function(t) {
						var e = this,
							i = e.options,
							o = e.element;
						if(t) {
							if(e.url = t, e.imageData = {}, !i.checkOrientation || !window.ArrayBuffer) return e.clone(), void 0;
							if(Ve.test(t)) return We ? e.read(I(t)) : e.clone(), void 0;
							var a = new XMLHttpRequest;
							a.onerror = a.onabort = function() {
								e.clone()
							}, a.onload = function() {
								e.read(a.response)
							}, i.checkCrossOrigin && A(t) && o.crossOrigin && (t = j(t)), a.open("get", t), a.responseType = "arraybuffer", a.withCredentials = "use-credentials" === o.crossOrigin, a.send()
						}
					}
				}, {
					key: "read",
					value: function(t) {
						var e = this,
							i = e.options,
							o = F(t),
							a = e.imageData,
							n = 0,
							r = 1,
							s = 1;
						if(o > 1) switch(e.url = O(t), o) {
							case 2:
								r = -1;
								break;
							case 3:
								n = -180;
								break;
							case 4:
								s = -1;
								break;
							case 5:
								n = 90, s = -1;
								break;
							case 6:
								n = 90;
								break;
							case 7:
								n = 90, r = -1;
								break;
							case 8:
								n = -90
						}
						i.rotatable && (a.rotate = n), i.scalable && (a.scaleX = r, a.scaleY = s), e.clone()
					}
				}, {
					key: "clone",
					value: function() {
						var t = this,
							e = t.element,
							i = t.url,
							o = void 0,
							a = void 0,
							n = void 0,
							r = void 0;
						t.options.checkCrossOrigin && A(i) && (o = e.crossOrigin, o ? a = i : (o = "anonymous", a = j(i))), t.crossOrigin = o, t.crossOriginUrl = a;
						var s = M("img");
						o && (s.crossOrigin = o), s.src = a || i, t.image = s, t.onStart = n = p(t.start, t), t.onStop = r = p(t.stop, t), t.isImg ? e.complete ? t.start() : y(e, Re, n) : (y(s, Re, n), y(s, Oe, r), u(s, "cropper-hide"), e.parentNode.insertBefore(s, e.nextSibling))
					}
				}, {
					key: "start",
					value: function(t) {
						var e = this,
							i = e.isImg ? e.element : e.image;
						t && (_(i, Re, e.onStart), _(i, Oe, e.onStop)), U(i, function(t, i) {
							d(e.imageData, {
								naturalWidth: t,
								naturalHeight: i,
								aspectRatio: t / i
							}), e.loaded = !0, e.build()
						})
					}
				}, {
					key: "stop",
					value: function() {
						var t = this,
							e = t.image;
						_(e, Re, t.onStart), _(e, Oe, t.onStop), P(e), t.image = null
					}
				}, {
					key: "build",
					value: function() {
						var t = this,
							e = t.options,
							i = t.element,
							o = t.image,
							a = void 0,
							r = void 0,
							s = void 0,
							l = void 0,
							d = void 0,
							p = void 0;
						if(t.loaded) {
							t.ready && t.unbuild();
							var c = M("div");
							c.innerHTML = W, t.container = a = i.parentNode, t.cropper = r = $(c, "cropper-container")[0], t.canvas = s = $(r, "cropper-canvas")[0], t.dragBox = l = $(r, "cropper-drag-box")[0], t.cropBox = d = $(r, "cropper-crop-box")[0], t.viewBox = $(r, "cropper-view-box")[0], t.face = p = $(d, "cropper-face")[0], T(s, o), u(i, Ie), a.insertBefore(r, i.nextSibling), t.isImg || m(o, "cropper-hide"), t.initPreview(), t.bind(), e.aspectRatio = Math.max(0, e.aspectRatio) || 0 / 0, e.viewMode = Math.max(0, Math.min(3, Math.round(e.viewMode))) || 0, t.cropped = e.autoCrop, e.autoCrop ? e.modal && u(l, "cropper-modal") : u(d, Ie), e.guides || u($(d, "cropper-dashed"), Ie), e.center || u($(d, "cropper-center"), Ie), e.background && u(r, "cropper-bg"), e.highlight || u(p, "cropper-invisible"), e.cropBoxMovable && (u(p, "cropper-move"), w(p, "action", "all")), e.cropBoxResizable || (u($(d, "cropper-line"), Ie), u($(d, "cropper-point"), Ie)), t.setDragMode(e.dragMode), t.render(), t.ready = !0, t.setData(e.data), t.completing = setTimeout(function() {
								n(e.ready) && y(i, He, e.ready, !0), x(i, He), x(i, Ne, t.getData()), t.complete = !0
							}, 0)
						}
					}
				}, {
					key: "unbuild",
					value: function() {
						var t = this;
						t.ready && (t.complete || clearTimeout(t.completing), t.ready = !1, t.complete = !1, t.initialImageData = null, t.initialCanvasData = null, t.initialCropBoxData = null, t.containerData = null, t.canvasData = null, t.cropBoxData = null, t.unbind(), t.resetPreview(), t.previews = null, t.viewBox = null, t.cropBox = null, t.dragBox = null, t.canvas = null, t.container = null, P(t.cropper), t.cropper = null)
					}
				}], [{
					key: "noConflict",
					value: function() {
						return window.Cropper = Ze, t
					}
				}, {
					key: "setDefaults",
					value: function(t) {
						d(V, a(t) && t)
					}
				}]), t
			}();
		return d(Xe.prototype, pe), d(Xe.prototype, he), d(Xe.prototype, Ce), d(Xe.prototype, Me), d(Xe.prototype, Ee), d(Xe.prototype, Se), "undefined" != typeof window && (Ze = window.Cropper, window.Cropper = Xe), Xe
	})
} catch(err) {}
_.Module.define({
	path: "ueditor/widget/ueditor_video/ueditor_video_url_dialog",
	sub: {
		tempHTML: ['<div style="padding:30px 0px 5px 30px" class="clearfix"><input type="text" class="v_layer_input form-control j_input" value="\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740"  ><a href="#" style="float:left;margin-left:5px;" class="btn_default btn_middle j_btn">\u63d2\u5165\u89c6\u9891</a></div>', '<div  class="j_error_tip v_error_tip" style="display:none;padding-left:30px;line-height:22px;"></div>', '<div style="color:#999;line-height:22px;padding:0 30px;" class="v_layer_text j_layer_text">\u76ee\u524d\u652f\u6301\u7231\u5947\u827a\u3001\u7f8e\u62cd\u3001\u4f18\u9177\u3001\u571f\u8c46\u3001\u641c\u72d0\u3001\u817e\u8baf\u3001\u4e50\u89c6\u3001ACFUN\u3001Bilibili\u7b49\u89c6\u9891\u7f51\u7ad9\u94fe\u63a5</div>'].join(""),
		mDialog: null,
		tempHTML: '<div class="video-poster-detail-url">\n	<table>\n		<tbody>\n			<tr>\n				<td class="td-title">\u64ad\u653e\u5730\u5740</td>\n				<td>\n					<input class="form-control video-poster-detail-url-src" video-poster-detail-url-src type="text" placeholder="\u8bf7\u8f93\u5165\u64ad\u653e\u5730\u5740">\n					\n					\n				</td>\n			</tr>\n			<tr>\n				<td class="td-title"></td>\n				<td>\n					<div class="video-poster-detail-url-src-errtip" video-poster-detail-url-src-errtip ></div>\n				</td>\n			</tr>\n			<tr>\n				<td class="td-title"></td>\n				<td>\n					<div class="video-poster-detail-url-src-subtitle" >		\n						\u76ee\u524d\u652f\u6301\u7231\u5947\u827a\u3001\u7f8e\u62cd\u3001\u4f18\u9177\u3001\u571f\u8c46\u3001\u641c\u72d0\u3001\u817e\u8baf\u3001\u4e50\u89c6\u3001ACFUN\u3001Bilibili\u7b49\u89c6\u9891\u7f51\u7ad9\u94fe\u63a5\n					</div>\n				</td>\n			</tr>\n		</tbody>\n	</table>\n	<div class="video-poster-detail-url-btn-wrap"><button class="btn-default btn-large" video-poster-detail-url-src-btn >\u63d2\u5165</button></div>\n</div>',
		_defaultHtml: "\u76ee\u524d\u652f\u6301\u7231\u5947\u827a\u3001\u7f8e\u62cd\u3001\u4f18\u9177\u3001\u571f\u8c46\u3001\u641c\u72d0\u3001\u817e\u8baf\u3001\u4e50\u89c6\u3001ACFUN\u3001Bilibili\u7b49\u89c6\u9891\u7f51\u7ad9\u94fe\u63a5",
		initial: function(t) {
			t = $.extend({}, t), this.fuckCDN = !0, this.model = t.model, this.parent = t.parent, this.editor = t.editor, this.urlLength = t.urlLength || 1024;
			var e = {
				convert_urls: [
					[/http:\/\/my\.tv\.sohu\.com\/u\/vw\/([0-9a-zA-Z_]*)$/gi, "http://my.tv.sohu.com/fo/v4/$1/my.swf"],
					[/http:\/\/tv\.sohu\.com\/([0-9a-zA-Z_]*)\/([0-9a-zA-Z_]*)\.shtml$/gi, "http://api.tv.sohu.com/url/$1/$2.shtml"],
					[/http:\/\/client\.joy\.cn\/flvplayer\/([0-9a-zA-Z]*)_([0-9]*)_[1-9]*_([0-9]*)\.swf$/gi, "http://client.joy.cn/flvplayer/$1_$2_0_$3.swf"],
					[/http:\/\/www\.56\.com\/u([0-9]*)\/v_([0-9a-zA-Z_]*)\.html$/gi, "http://player.56.com/v_$2.swf"],
					[/http:\/\/www\.56\.com\/w([0-9]*)\/play_album-aid-([0-9]*)_vid-([0-9a-zA-Z_]*)\.html$/gi, "http://player.56.com/v_$3.swf"],
					[/http:\/\/www\.letv\.com\/ptv\/vplay\/([0-9a-zA-Z_]*)(\.html)?$/gi, "http://www.letv.com/player/share/baidu/x$1.swf"],
					[/http:\/\/www\.letv\.com\/player\/x([0-9a-zA-Z_]*)\.swf$/gi, "http://www.letv.com/player/share/baidu/x$1.swf"],
					[/http:\/\/www\.aipai\.com\/([a-z]*)([0-9]*)\/([0-9a-zA-Z]*)\.html$/gi, "http://www.aipai.com/$1$2/$3/playerOut.swf"],
					[/http:\/\/mv\.molihe\.com\/show\/([0-9]*)$/gi, "http://mv.molihe.com/molihe_play-1-$1.swf"],
					[/http:\/\/www\.tudou\.com\/programs\/view\/([0-9a-zA-Z]*)\/?$/gi, "http://www.tudou.com/v/$1/v.swf"],
					[/http:\/\/www\.boosj\.com\/([0-9]*)\.html$/gi, "http://static.boosj.com/v/swf/w_player1.0_$1.swf"],
					[/http:\/\/([0-9a-zA-Z_]*)\.kankanews\.com\/vods\/([0-9a-zA-Z_]*)\/([0-9a-zA-Z_]*)(\/)?$/gi, "http://www.kankanews.com/object/kankanewsplayer-tieba.swf?autoPlay=false&streamType=recorded&mutiDynamicStreamPlay=true&cid=$2&vid=$3&server=http://www.kankanews.com/dataservice/&otherLink=true&bufferTime=4"],
					[/http:\/\/www\.kankanews\.com\/object\/kankanewsplayer([0-9a-zA-Z\-\.]*)\.swf/gi, "http://www.kankanews.com/object/kankanewsplayer3.0.swf"],
					[/http:\/\/www\.m1905\.com\/video\/play\/([0-9]*)\.shtml$/gi, "http://www.m1905.com/video/s/$1/v.swf?autoplay=0"],
					[/http:\/\/www\.m1905\.com\/video\/m\/([0-9]*)\/v\.swf/gi, "http://www.m1905.com/video/s/$1/v.swf?autoplay=0"],
					[/http:\/\/v\.ifeng\.com\/news\/([0-9a-zA-Z_\-]*)\/([0-9]{6})\/([0-9a-zA-Z_\-]*)\.shtml/gi, "http://v.ifeng.com/include/exterior.swf?guid=$3&AutoPlay=false"],
					[/http:\/\/s\.v\.ifeng\.com\/([0-9a-zA-Z_\-]*)\/([0-9a-zA-Z_\-]*)/gi, "http://s.v.ifeng.com/tieba/$1/$2.swf"],
					[/(http:\/\/share\.vrs\.sohu\.com\/[0-9a-zA-Z_]*\/v\.swf)(\S*)(&xuid\s*)$/gi, "$1&autoplay=false$3"],
					[/http:\/\/v\.youku\.com\/v_show\/id_([0-9a-zA-Z_]+)\.html/gi, "http://player.youku.com/player.php/sid/$1/v.swf"],
					[/http:\/\/www\.tudou\.com\/programs\/view\/([0-9a-zA-Z]*)\/?$/gi, "http://www.tudou.com/v/$1/v.swf"],
					[/http:\/\/v\.ku6\.com\/show\/([0-9a-zA-Z_\.&\?]+).html/gi, "http://player.ku6.com/refer/$1/v.swf"],
					[/http:\/\/v\.ku6\.com\/special\/([0-9a-zA-Z_\.&\?]+).html/gi, "http://player.ku6.com/refer/$1/v.swf"],
					[/http:\/\/www\.56\.com\/u([0-9a-zA-Z_]+)\/([0-9a-zA-Z_\.&\?]+).html/gi, "http://player.56.com/$2.swf"],
					[/(http:\/\/www\.cutv\.com\/static\/player\/v\.swf\?(id|pid|video)=[0-9a-zA-Z_\/\:\-\%\.]*)(\S*)$/gi, "$1&autoplay=false"]
				],
				mp4_url: [],
				convertToMp4: function(t) {
					for(var e = this.mp4_url, i = t, o = 0; o < e.length; o++) t = t.replace(e[o][0], e[o][1]);
					return t == i && (t = ""), t
				},
				auto_params: [
					["client.joy.cn", "playstatus", /playstatus=/gi, "0"],
					["//v.ifeng.com", "AutoPlay", /AutoPlay=/gi, "false"],
					["m1905.com", "autoplay", /autoplay=/gi, "0"],
					["kankanews.com", "otherLink", /otherLink=/gi, "false"]
				],
				convert: function(t) {
					for(var e = this.convert_urls, i = 0; i < e.length; i++) t = t.replace(e[i][0], e[i][1]);
					return t
				},
				filter_param: function(t) {
					t.indexOf("share.vrs.sohu.com") < 0 && (t = t.replace(/(\&)?\w*auto\w*=[\w\d]+/gi, ""));
					for(var e = this.auto_params, i = 0; i < e.length; i++) {
						var o = e[i];
						t.indexOf(o[0]) > -1 && (t = t.replace(o[2], "old_invalid="), t += (t.indexOf("?") > -1 ? "&" : "?") + o[1] + "=" + o[3])
					}
					return t
				}
			};
			this.Post_Video_URL = e, this.init()
		},
		init: function() {
			var t = this;
			this.mDialog = new $.dialog({
				title: "\u63d2\u5165\u89c6\u9891\u5730\u5740",
				html: '<div class="video-poster" video-poster ></div>',
				width: 550,
				height: 160,
				show: !1,
				resizeable: !0,
				holderClassName: "video-poster-dialog"
			}), $template = $(t.tempHTML), this.mDialog.element.find("[video-poster]").html($template), this.mDialog.show(), this.$srcInput = this.mDialog.element.find("[video-poster-detail-url-src]"), this.$srcErrTip = this.mDialog.element.find("[video-poster-detail-url-src-errtip]"), this.$inserBtn = this.mDialog.element.find("[video-poster-detail-url-src-btn]"), this.bindEvent()
		},
		bindEvent: function() {
			var t = this;
			this.$inserBtn.click(function(e) {
				e.preventDefault(), e.stopPropagation(), t.accept()
			}), this.$srcInput.on("keyup", function() {
				var e = t.$srcInput.val();
				t.inputTip(e)
			})
		},
		insertFlash: function(t, e, i, o) {
			var a = this;
			a.getVideoInfo(t, e);
			var n = (this.editor, a.videoInfo);
			return n && n.swf_url ? (this.parent.trigger("insertvideo", {
				swf_url: n.swf_url || "null",
				html_url: n.html_url || "null",
				pkey: n.pri_key || "null",
				vpic: n.img_url || "null",
				html5: n.html5 || "null"
			}), "html" == o && $.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=htmlUrl&st_value=1"), "tdswf" == o && $.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=tdswfUrl&st_value=1"), a.mDialog.close(), !0) : (0 == e && this.showError(i), !1)
		},
		showError: function(t) {
			this.$srcErrTip.html(t)
		},
		inputTip: function(t) {
			var e = this,
				i = $.trim(t);
			i = e.formatUrl(i);
			var o = e.checkInApi(i),
				a = e.checkType(i);
			return "illegal" == a ? (e.showError("\u8f93\u5165\u94fe\u63a5\u6709\u8bef\uff0c\u8bf7\u91cd\u8bd5"), void 0) : o && "swf" == a ? (e.showError("\u63d0\u793a\uff1a\u8be5\u89c6\u9891\u683c\u5f0f\u65e0\u6cd5\u5728\u624b\u673a\u6216pad\u4e0a\u64ad\u653e\u54e6~\u8bf7\u7c98\u8d34\u5176\u4ed6\u7c7b\u578b\u94fe\u63a5\u5730\u5740\u5427\u3002"), void 0) : o || "html" != a ? void 0 : (e.showError("\u63d0\u793a\uff1a\u8d34\u5427\u6682\u4e0d\u652f\u6301\u8be5\u7f51\u7ad9\u7684\u64ad\u653e\u9875\u5730\u5740\uff0c\u8bf7\u76f4\u63a5\u4f7f\u7528\u89c6\u9891\u5730\u5740\u3002"), void 0)
		},
		IE: !(!window.attachEvent || window.opera),
		validAddrPrefixs: ["http://img.ku6.com/common/V2.0.baidu.swf?vid=", "http://www.tudou.com/v/", "http://www.tudou.com/player/playlist.swf?lid=", "http://www.56.com/", "http://player.youku.com/", "http://6.cn/", "http://player.ku6.com/refer/", "http://tv.mofile.com/cn/xplayer.swf?v=", "http://v.blog.sohu.com/fo/v4/", "http://v.blog.sohu.com/fo/p4/", "http://vhead.blog.sina.com.cn/player/outer_player.swf?", "http://img.openv.tv/hd/swf/hd_player.swf?pid=", "http://www.cnboo.com/flash/player.swf?ids=", "http://video.pomoho.com/swf/out_player.swf?flvid=", "http://video.cctv.com/flash/cctv_player.swf?VideoID=", "http://misc.home.news.cn/video/swf/VideoDisplay.swf?videoSource=", "http://mv.baidu.com/export/flashplayer.swf?playlist=", "http://mv.baidu.com/export/flashplayer.swf?vid=", "http://client.joy.cn/flvplayer/", "http://www.meipai.com/", "http://baishi.baidu.com/", "http://www.acfun.tv", "http://www.bilibili.com", "http://bangumi.bilibili.com"],
		accept: function() {
			$.stats.hive("videoByLayer_insert"), this.editor, PosterContext.getAuthorities().white_list ? PosterContext.getAuthorities().white_list : this.validAddrPrefixs;
			var t = this,
				e = (t.Post_Video_URL, t.formatUrl($.trim(t.$srcInput.val()))),
				i = t.checkInApi(e),
				o = t.checkType(e),
				a = e.toLowerCase();
			if(a.length <= 0 || "https://" == a || "http://" == a || "ftp://" == a || "rtsp://" == a || "mms://" == a) return this.showError("\u89c6\u9891\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a"), !1;
			if(e.getByteLength() > this.urlLength || "illegal" == o) return t.showError("\u8f93\u5165\u94fe\u63a5\u6709\u8bef\uff0c\u8bf7\u91cd\u8bd5"), !1;
			if(!i && "html" == o) return t.showError("\u63d0\u793a\uff1a\u8d34\u5427\u6682\u4e0d\u652f\u6301\u8be5\u7f51\u7ad9\u7684\u64ad\u653e\u9875\u5730\u5740\uff0c\u8bf7\u76f4\u63a5\u4f7f\u7528\u89c6\u9891\u5730\u5740\u3002"), void 0;
			if(!i || "html" != o) return t.showError("\u63d0\u793a\uff1a\u8be5\u89c6\u9891\u683c\u5f0f\u65e0\u6cd5\u5728\u624b\u673a\u6216pad\u4e0a\u64ad\u653e\u54e6~\u8bf7\u7c98\u8d34\u5176\u4ed6\u7c7b\u578b\u94fe\u63a5\u5730\u5740\u5427\u3002"), !1;
			var n = t.insertFlash(e, 0, "\u5bf9\u4e0d\u8d77\uff0c\u60a8\u8f93\u5165\u7684\u89c6\u9891\u64ad\u653e\u9875\u94fe\u63a5\u65e0\u6548\uff0c\u8bf7\u91cd\u8bd5", "html");
			return n ? ($.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=videoByLayer&st_value=1"), !1) : ($.stats.sendRequest("fr=tb0_forum&st_mod=editor&st_type=htmlFail&st_value=1"), !1)
		},
		isRever: function(t) {
			for(var e = ["youku.com", "tudou.com"], i = 0, o = e.length; o > i; i++)
				if(-1 != t.search(e[i])) return !0;
			return !1
		},
		getVideoInfo: function(t, e) {
			var i = this;
			$.ajax({
				url: "/f/commit/commonapi/getVideoInfoApi",
				data: {
					url: t,
					type: e
				},
				type: "post",
				dataType: "json",
				success: function(t) {
					0 == t.no && (i.videoInfo = t.data)
				},
				async: !1
			})
		},
		formatUrl: function(t) {
			var e = t.replace(/^http:\/\/http:\/\//g, "http://"),
				i = /^(https:\/\/|http:\/\/|ftp:\/\/|rtsp:\/\/|mms:\/\/)/;
			return i.test(e.toLowerCase()) || (e = "http://" + e), e
		},
		checkType: function(t) {
			var e = /(\.xml|\.jpg|\.jpeg|\.bmp|\.png|\.gif|\.tif)$/;
			return e.test(t) ? "illegal" : (e = /\.swf/, e.test(t) ? "swf" : "html")
		},
		checkInApi: function(t) {
			for(var e = ["youku.com", "tudou.com", "qiyi.com", "letv.com", "56.com", "ifeng.com", "ku6.com", "qq.com", "sohu.com", "sina.com.cn", "funshion.com", "yinyuetai.com", "v.pps.tv", "ipd.pps.tv", "aipai.com", "mgtv.com", "meipai.com", "baishi.baidu.com", "acfun.tv", "bilibili.com"], i = 0, o = e.length; o > i; i++)
				if(-1 != t.search(e[i])) return !0;
			return !1
		}
	}
}), _.Module.define({
	path: "ueditor/widget/ueditor_video/ueditor_video_dialog",
	requires: [],
	sub: {
		mDialog: null,
		videoUploadSize: 2097152,
		URLS: {
			uploadImage: "https://uploadphotos.baidu.com/Pic/upload?pid=tieba&filetype=base64",
			uploadVideoBlock: "/video/pc/uploadBlock",
			getUserVideoInfo: "video/pc/getBaseInfo",
			postVideoThread: "/video/pc/publishVideoThread",
			uploadMonitor: "/video/pc/uploadMonitor"
		},
		postParam: {
			title: "",
			tags: [],
			video_url: "",
			video_md5: "",
			video_format: "",
			total_len: 0,
			block_num: 0,
			thumbnail_url: "",
			thumbnail_pic_id: 0,
			thumbnail_width: 0,
			thumbnail_height: 0,
			channel_id: 0
		},
		fileMd5Time: 0,
		userVideoChannelInfo: [],
		limitChooseTags: 4,
		limitTitleLen: 60,
		limitTagLen: 8,
		tmpTagName: "",
		tmpTitle: "",
		videoFileUploading: !1,
		selfDefineTags: [],
		newDefineTags: [],
		defaultTags: [],
		videoTypeAccess: ["mp4", "flv", "f4v", "webm", "m4v", "mov", "3gp", "rm", "rmvb", "ram", "wmv", "avi", "asf", "mpg", "mpeg", "dvix", "dv", "vob", "dat", "mkv", "cpk", "qt", "fli", "flc", "mod"],
		initial: function(t) {
			this.fuckCDN = !0, this.option = t;
			var e = this;
			$.stats.track("\u65b0\u89c6\u9891\u4e0a\u4f20\u70b9\u51fb", "PC\u65b0\u89c6\u9891\u4e0a\u4f20\u7edf\u8ba1", "frs", "click"), $.getJSON("/fex/check/isRealName", function(t) {
				t.data === !1 && 1 === PageData.user.is_login && (e.realname = !1, $.tb.checkRealName())
			}), this.initUserVideoInfo(function() {
				e.showUploadFrontPage()
			})
		},
		initUserVideoInfo: function(t) {
			var e = this;
			$.ajax({
				url: this.URLS.getUserVideoInfo,
				type: "GET",
				data: {},
				success: function(i) {
					0 === parseInt(i.no, 10) ? (e.defaultTags = i.data.tags, e.userVideoChannelInfo = i.data.channel_infos, t && t()) : alert(i.msg ? i.msg : JSON.stringify(i))
				},
				error: function() {
					alert("\u7528\u6237\u6807\u7b7e\u548c\u5fae\u5427\u4fe1\u606f\u83b7\u53d6\u5931\u8d25")
				}
			})
		},
		bindEvent: function() {},
		postVideo: function() {},
		showPostSuccessDialog: function() {
			var t = '<div class="video-poster-success">\n    <img src="//tb2.bdstatic.com/tb/img/success-icon_bf1ec70.png" class="video-poster-success-icon">\n    <p class="video-poster-success-text">\u89c6\u9891\u5df2\u7ecf\u5c31\u7eea\uff0c\u8bf7\u7b49\u5f85\u5ba1\u6838\uff0c\u53d1\u5e03\u6210\u529f\u60a8\u4f1a\u6536\u5230\u63d0\u9192</p>\n</div>\n<div class="video-poster-success-bottom" >\n    <button class="btn-default btn-large" post-video-success-close-btn >\u5173\u95ed</button>\n</div>';
			this.mDialog && this.mDialog.close(), this.mDialog = new $.dialog({
				title: "\u53d1\u5e03\u89c6\u9891\u8d34",
				html: '<div class="video-poster video-poster-warning video-poster-success" video-poster ></div>',
				width: 550,
				height: 240,
				show: !1,
				holderClassName: "video-poster-dialog"
			});
			var e = this,
				i = $(t);
			this.mDialog.element.find("[video-poster]").append(i), this.mDialog.element.on("click", "[post-video-success-close-btn]", function(t) {
				t.preventDefault(), e.mDialog.close()
			}), this.mDialog.show()
		},
		showRemovePostContentWarningPage: function(t) {
			var e = "//tb2.bdstatic.com/tb/img/warning-icon_10da47b.png",
				i = ["<div>", '<img src="' + e + '" class="video-poster-warning-icon">', '<p class="video-poster-warning-text">\u89c6\u9891\u6dfb\u52a0\u6b63\u6587\u529f\u80fd\u6682\u672a\u4e0a\u7ebf\uff0c\u60a8\u521a\u521a\u6dfb\u52a0\u7684\u6b63\u6587\u5185\u5bb9\u6b64\u6b21\u5c06\u4e0d\u80fd\u88ab\u4fdd\u5b58</p>', "</div>", '<div class="video-poster-warning-bottom" >', '<button class="btn-default btn-large" post-video-continue >\u7ee7\u7eed\u53d1\u5e03</button>', '<button class="btn-sub btn-large" post-video-cancel >\u53d6\u6d88</button>', "</div>"].join(""),
				o = new $.dialog({
					title: "\u53d1\u5e03\u89c6\u9891\u8d34",
					html: '<div class="video-poster video-poster-warning" video-poster ></div>',
					width: 550,
					height: 410,
					show: !1,
					holderClassName: "video-poster-dialog"
				}),
				a = this,
				n = $(i);
			o.element.find("[video-poster]").append(n), o.element.on("click", "[post-video-cancel]", function(t) {
				t.preventDefault(), o.close(), a.mDialog.close()
			}).on("click", "[post-video-continue]", function(e) {
				e.preventDefault(), t && t(), o.close()
			}), o.show()
		},
		sendMonitor: function(t) {
			t.tbs = PageData.tbs, t.user = PageData.user, t.forum = PageData.forum, $.post(this.URLS.uploadMonitor, t, function() {})
		},
		showUploadDetailPage: function(t) {
			var e = this,
				i = [],
				o = !1,
				a = this.defaultTags,
				n = !1;
			this.postParam.tags = [], window.onbeforeunload = function() {
				return confirm("\u60a8\u786e\u5b9a\u8981\u79bb\u5f00\u6b64\u7f51\u7ad9\u5417\uff1f\u7cfb\u7edf\u53ef\u80fd\u4e0d\u4f1a\u4fdd\u5b58\u60a8\u6240\u586b\u5199\u7684\u5185\u5bb9")
			};
			var r = $.cookie(PageData.user.id + "_selfVideoTags");
			"undefined" === r && (r = null), r && (r = JSON.parse(r)), "string" == typeof r && (r = [r]);
			for(var s in a) i.push('<li><a class="btn-sub btn-small video-tag-item video-tag-item-default" data-name="' + a[s] + '" video-tag-item>' + a[s] + "</a></li>");
			if(r) {
				console.log(r), this.selfDefineTags = r;
				for(var s in this.selfDefineTags)
					if(this.selfDefineTags.hasOwnProperty(s)) {
						var l = this.selfDefineTags[s];
						i.push('<li><a class="btn-sub btn-small video-tag-item vide-tag-item-self" video-tag-item  data-name="' + l + '"> ' + l + '<i class="iconfont icon-image video-tag-item-rm" video-tag-item-rm >&#xe606;</i> </a></li>')
					}
			}
			i = i.join("");
			var d = ['<div class="video-poster-detail" >', '<table  class="video-poster-detail-table" >', "<tbody>", "<tr>", '<td class="td-title">\u4e0a\u4f20\u89c6\u9891</td>', "<td>", '<div class="video-uploader-filename">' + t.name + "</div>", '<div class="video-uploader-result" video-uploader-result></div>', '<div class="video-uploader-process" video-uploader-process>', '<div class="video-uploader-process-bar" video-uploader-process-bar>', '<div class="video-uploader-process-bar-inner" video-uploader-process-bar-inner ></div>', "</div>", '<div class="video-uploader-process-text" video-uploader-process-text >0%</div>', "</div>", '<div class="video-uploader-retry" video-uploader-retry ><button class="btn-default btn-small" video-uploader-retry-btn >\u91cd\u65b0\u4e0a\u4f20</button></div>', '<div class="video-poster-errtip" video-poster-upload-errtip ></div>', "</td>", "</tr>", "<tr>", '<td class="td-title">\u6807\u9898<span class="red-star">*<span></td>', "<td>", '<input class="form-control video-poster-detail-title" video-poster-detail-title type="text" placeholder="\u8bf7\u586b\u519930\u5b57\u4ee5\u5185\u7684\u6807\u9898"  >', '<div class="video-poster-errtip" video-poster-title-errtip ></div>', "</td>", "</tr>", "<tr>", '<td class="td-title">\u6807\u7b7e<span class="red-star">*<span></td>', "<td>", "<div video-tag-list >", '<ul class="video-tag-list-wrap" video-tag-list-wrap >' + i + "</ul>", '<input type="text" placeholder="\u81ea\u5b9a\u4e49\u6807\u7b7e" class="video-poster-detail-tag-input form-control" video-poster-detail-tag-input >', "</div>", '<div class="video-poster-errtip" video-poster-tag-errtip ></div>', "</td>", "</tr>", "<tr>", '<td class="td-title">\u5c01\u9762\u56fe\u7247</td>', "<td>", '<div  class="video-poster-thumbnail-preview-wrap" video-poster-detail-image-btn >', '<img class="video-poster-thumbnail-preview" video-poster-thumbnail-preview >', '<div class="video-poster-thumbnail-preview-btn" video-poster-thumbnail-preview-btn ></div>', "</div>", '<div class="video-poster-errtip" video-poster-img-errtip ></div>', '<input type="file" accept="image/*" class="video-upload-file-input" video-poster-thumbnail-input  >', "</td>", "</tr>", "<tr>", "</tr>", "</tbody>", "</table>", '<div class="post-video-btn-wrap" ><button class="btn-default btn-lager post-video-btn" post-video-btn >\u53d1\u5e03</button>', '<div class="video-poster-errtip video-poster-post-errtip" video-poster-post-errtip ></div>', "</div>", "</div>"].join("");
			$template = $(d), this.mDialog && this.mDialog.close(), this.mDialog = null, this.mDialog = new $.dialog({
				title: "\u53d1\u5e03\u89c6\u9891\u8d34",
				html: '<div class="video-poster" video-poster ></div>',
				width: 550,
				height: 480,
				show: !1,
				resizeable: !0,
				holderClassName: "video-poster-dialog"
			}), this.mDialog.element.find("[video-poster]").html($template), this.mDialog.bind("onclose", function() {
				return n || confirm("\u60a8\u786e\u5b9a\u8981\u5173\u95ed\u5417\uff1f\u7cfb\u7edf\u53ef\u80fd\u4e0d\u4f1a\u4fdd\u5b58\u60a8\u6240\u586b\u5199\u7684\u5185\u5bb9") ? (window.onbeforeunload = function() {}, !0) : !1
			});
			var e = this,
				p = this.mDialog.element.find("[video-uploader-process-bar-inner]"),
				c = this.mDialog.element.find("[video-uploader-process-text]"),
				h = this.mDialog.element.find("[video-poster-upload-errtip]"),
				u = this.mDialog.element.find("[video-poster-title-errtip]"),
				m = this.mDialog.element.find("[video-poster-tag-errtip]"),
				v = this.mDialog.element.find("[video-tag-list-wrap]"),
				f = this.mDialog.element.find("[video-poster-img-errtip]"),
				g = this.mDialog.element.find("[video-poster-post-errtip]");
			c.html("\u51c6\u5907\u4e2d...");
			var w = $(".j_topic_sug_input").val();
			w && this.mDialog.element.find("[video-poster-detail-title]").val(w), this.mDialog.show(), this.mDialog.element.on("click", "[video-uploader-retry-btn]", function() {
				$(this).hide(), uploadInstance.retryIndex = 0, uploadInstance.upload(t)
			}).on("keyup", "[video-poster-detail-title]", function(t) {
				var i = $(this),
					o = $.trim(i.val()),
					a = e.limitTitleLen;
				return e.strlen(o) > a ? (i.val(e.tmpTitle), u.html("\u60a8\u5df2\u7ecf\u8d85\u8fc730\u4e2a\u5b57\u5566\uff01"), t.preventDefault(), !1) : (e.tmpTitle = o, u.html(""), e.postParam.title = o, void 0)
			}).on("keyup", "[video-poster-detail-tag-input]", function(t) {
				var i = $(this);
				if(13 == t.keyCode) {
					t.preventDefault();
					var o = $.trim(i.val());
					if("" == o) return !1;
					var a = e.limitTagLen;
					if(e.strlen(o) > a) return m.html("\u6bcf\u4e2a\u6807\u7b7e\u6700\u591a4\u4e2a\u6c49\u5b57"), t.preventDefault(), !1;
					if(e.tmpTagName = o, m.html(""), e.postParam.tags.length >= e.limitChooseTags) m.html("\u6700\u591a\u9009\u62e9" + e.limitChooseTags + "\u4e2a\u6807\u7b7e");
					else if(e.selfDefineTags.indexOf(o) < 0 && e.defaultTags.indexOf(o) < 0) {
						var n = '<li><a class="btn-default btn-small video-tag-item vide-tag-item-self" video-tag-item  data-name="' + o + '"> ' + o + '<i class="iconfont icon-image video-tag-item-rm" video-tag-item-rm >&#xe606;</i> </a></li>';
						i.val(""), v.append(n), $.stats.track("\u7528\u6237\u751f\u6210\u81ea\u5b9a\u4e49\u6807\u7b7e", "PC\u65b0\u89c6\u9891\u4e0a\u4f20\u7edf\u8ba1", "frs", "click"), e.selfDefineTags.push(o), e.postParam.tags.push(o), e.newDefineTags.push(o), m.html("")
					} else m.html("\u6807\u7b7e\u5df2\u7ecf\u5b58\u5728");
					return !0
				}
			}).on("click", "[video-tag-item-rm]", function(t) {
				t.preventDefault(), t.stopPropagation();
				var i = $(this),
					o = i.parent(),
					a = o.tbattr("data-name");
				return e.selfDefineTags = e.removeTagFromList(a, e.selfDefineTags), e.newDefineTags = e.removeTagFromList(a, e.newDefineTags), e.postParam.tags = e.removeTagFromList(a, e.postParam.tags), o.remove(), !1
			}).on("click", "[video-tag-item]", function(t) {
				t.preventDefault(), t.stopPropagation(), m.html(""), console.log(e.postParam.tags), e.chooseTag(this)
			}).on("click", "[video-poster-detail-image-btn]", function(t) {
				t.preventDefault(), e.mDialog.element.find("[video-poster-thumbnail-input]").trigger("click")
			}).on("change", "[video-poster-thumbnail-input]", function(t) {
				t.preventDefault(), this.files && this.files[0] && (e.uploadVideoThumbnail(this.files[0]), f.html(""), e.mDialog.element.find("[video-poster-thumbnail-input]").val(""))
			}).on("click", "[post-video-btn]", function() {
				if(1 == o) return !1;
				u.html(""), m.html(""), h.html(""), f.html("");
				var t = !1;
				if(e.postParam.title = $.trim(e.mDialog.element.find("[video-poster-detail-title]").val()), 0 == e.postParam.tags.length && (m.html("\u8bf7\u9009\u62e9\u89c6\u9891\u6807\u7b7e"), t = !0), "" == e.postParam.title ? (u.html("\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a"), t = !0) : "#" == e.postParam.title[0] && "#" == e.postParam.title[e.postParam.title.length - 1] && (u.html("\u53ea\u6709#\u8bdd\u9898#\u662f\u4e0d\u884c\u7684\u54df~\u8bf7\u5728\u8bdd\u9898\u540e\u586b\u5199\u6b63\u5f0f\u6807\u9898\uff01"), t = !0), e.videoFileUploading ? (h.html("\u4e0a\u4f20\u4e2d\u8bf7\u8010\u5fc3\u7b49\u5f85"), t = !0) : "" == e.postParam.video_url && (h.html("\u8bf7\u4e0a\u4f20\u89c6\u9891"), t = !0), t) return !1;
				o = !0, $btn = $(this), $btn.removeClass("btn-default").addClass("btn-default-disabled").html("\u53d1\u5e03\u4e2d..."), e.postParam.channel_id = 0;
				var i = {
					channel_id: e.postParam.channel_id,
					video_tags: e.postParam.tags,
					fname: PageData.forum.name,
					fid: PageData.forum.id,
					video_url: e.postParam.video_url,
					video_width: 0,
					video_height: 0,
					video_duration: 0,
					video_format: e.postParam.video_format,
					video_size: e.postParam.total_len,
					video_md5: e.postParam.video_md5,
					thumbnail_pic_id: e.postParam.thumbnail_pic_id,
					thumbnail_width: e.postParam.thumbnail_width,
					thumbnail_height: e.postParam.thumbnail_height,
					desc: e.postParam.title,
					tbs: PageData.tbs
				};
				$(".j_poster_to_profile_in_frs").tbattr("checked") && (i.is_personal_thread = 1), g.html(""), $.ajax({
					url: e.URLS.postVideoThread,
					type: "POST",
					dataType: "json",
					data: i,
					success: function(t) {
						console.log(t), 0 == parseInt(t.no, 10) ? (n = !0, e.updateLastSelfDefineTag(), e.showPostSuccessDialog()) : (o = !1, $btn.addClass("btn-default").removeClass("btn-default-disabled").html("\u91cd\u65b0\u53d1\u5e03"), alert("\u53d1\u5e03\u5931\u8d25[" + t.msg + "]"), g.html("\u53d1\u5e03\u5931\u8d25," + t.msg), e.sendMonitor({
							msg: "post faild",
							data: t
						}))
					},
					error: function() {
						o = !1, $btn.addClass("btn-default").removeClass("btn-default-disabled").html("\u91cd\u65b0\u53d1\u5e03"), alert("\u8bf7\u6c42\u8d85\u65f6"), g.html("\u8bf7\u6c42\u8d85\u65f6"), e.sendMonitor({
							msg: "post faild",
							data: "http fail"
						})
					}
				})
			}), setTimeout(function() {
				var i = new uploadVideo({
					blockUploadPreFn: function() {},
					blockUploadErrFn: function(t, i) {
						var o = "\u5931\u8d25\u91cd\u8bd5" + i + "\u6b21",
							a = {};
						a = $.extend({}, t), a.block_data && delete a.block_data, a.file && delete a.file, e.sendMonitor({
							msg: "upload retry",
							data: a,
							retryTimes: i
						}), h.html(o)
					},
					blockUploadDoneFn: function(t, e) {
						p.css({
							width: 360 * t / e
						}), console.log(t, e, t / e, 360 * t / e), c.html(Math.ceil(100 * t / e) + "%")
					},
					uploadReadyFn: function() {
						e.sendMonitor({
							msg: "file md5 couting",
							data: Date.now() - e.fileMd5Time,
							filesize: t.size,
							unit: "ms"
						})
					},
					uploadPreFn: function() {
						e.fileMd5Time = Date.now(), e.videoFileUploading = !0
					},
					uploadDoneFn: function(t, i) {
						e.videoFileUploading = !1, t ? (e.postParam.video_url = i.video_url, e.postParam.video_md5 = i.video_md5, e.postParam.video_format = i.video_format, e.postParam.total_len = i.total_len, e.postParam.upload_id = i.upload_id, e.mDialog.element.find("[video-uploader-process]").hide(), e.mDialog.element.find("[video-uploader-result]").html("\u89c6\u9891\u4e0a\u4f20\u6210\u529f!"), e.sendMonitor({
							msg: "upload file success",
							data: e.postParam
						})) : (e.sendMonitor({
							msg: "upload file fail",
							data: i
						}), h.html("\u4e0a\u4f20\u5931\u8d25"))
					},
					uploadErrFn: function(t) {
						e.mDialog.element.find("[video-uploader-retry]").show();
						var i = "\u4e0a\u4f20\u5931\u8d25";
						e.sendMonitor({
							msg: "upload file fail",
							data: t
						}), h.html(i)
					}
				});
				i.upload(t)
			}, 1)
		},
		removeTagFromList: function(t, e) {
			var i = e.indexOf(t);
			return i >= 0 && (e = e.slice(0, i).concat(e.slice(i + 1, e.length))), e
		},
		updateLastSelfDefineTag: function() {
			$.cookie(PageData.user.id + "_selfVideoTags", JSON.stringify(this.newDefineTags), 86400)
		},
		chooseTag: function(t) {
			var e = $(t),
				i = this.mDialog.element.find("[video-poster-tag-errtip]"),
				o = e.tbattr("data-name");
			$.stats.track("\u6807\u7b7e\u70b9\u51fb", "PC\u65b0\u89c6\u9891\u4e0a\u4f20\u7edf\u8ba1", "frs", "click", {
				obj_name: o
			}), e.hasClass("btn-default") ? (e.addClass("btn-sub"), e.removeClass("btn-default"), this.postParam.tags = this.removeTagFromList(o, this.postParam.tags)) : this.postParam.tags.length >= this.limitChooseTags ? i.html("\u6700\u591a\u9009\u62e9" + this.limitChooseTags + "\u4e2a\u6807\u7b7e") : (e.addClass("btn-default"), e.removeClass("btn-sub"), this.postParam.tags.push(o))
		},
		uploadVideoThumbnail: function(t) {
			var e = !1,
				i = ['<form class="uploadImageForm" ><input type="hidden" class="uploadFile" name="file"></form>', '<div class="video-poster-thumbnail-main clearfix" video-poster-thumbnail-main >', '<div class="video-poster-thumbnail-cropper-wrap clearfix" >', '<div class="video-poster-thumbnail-cropper-section">\n        <!-- <h3>Demo:</h3> -->\n    <div class="video-poster-thumbnail-subtitle">\u81ea\u5b9a\u4e49\u89c6\u9891\u5c01\u9762</div>\n    <div class="img-container">\n        <img src="" alt="Picture">\n    </div>\n</div>\n<div class="video-poster-thumbnail-preview-section">\n    <!-- <h3>Preview:</h3> -->\n    <div class="video-poster-thumbnail-subtitle">\u5c01\u9762\u9884\u89c8</div>\n    <div class="img-preview-wrap clearfix">\n      <div class="img-preview ">\n\n      </div>\n      <img  class="img-preview-play-btn " src="//tb2.bdstatic.com/tb/img/play-icon_410d4fe.png" >\n    </div>\n    <!-- <h3>Data:</h3> -->\n     <!-- <div class="docs-data">\n      <div class="input-group input-group-sm">\n        <label class="input-group-addon" for="dataX">X</label>\n        <input type="text" class="form-control" id="dataX" placeholder="x">\n        <span class="input-group-addon">px</span>\n      </div>\n      <div class="input-group input-group-sm">\n        <label class="input-group-addon" for="dataY">Y</label>\n        <input type="text" class="form-control" id="dataY" placeholder="y">\n        <span class="input-group-addon">px</span>\n      </div>\n      <div class="input-group input-group-sm">\n        <label class="input-group-addon" for="dataWidth">Width</label>\n        <input type="text" class="form-control" id="dataWidth" placeholder="width">\n        <span class="input-group-addon">px</span>\n      </div>\n      <div class="input-group input-group-sm">\n        <label class="input-group-addon" for="dataHeight">Height</label>\n        <input type="text" class="form-control" id="dataHeight" placeholder="height">\n        <span class="input-group-addon">px</span>\n      </div>\n      <div class="input-group input-group-sm">\n        <label class="input-group-addon" for="dataRotate">Rotate</label>\n        <input type="text" class="form-control" id="dataRotate" placeholder="rotate">\n        <span class="input-group-addon">deg</span>\n      </div>\n      <div class="input-group input-group-sm">\n        <label class="input-group-addon" for="dataScaleX">ScaleX</label>\n        <input type="text" class="form-control" id="dataScaleX" placeholder="scaleX">\n      </div>\n      <div class="input-group input-group-sm">\n        <label class="input-group-addon" for="dataScaleY">ScaleY</label>\n        <input type="text" class="form-control" id="dataScaleY" placeholder="scaleY">\n      </div>\n    </div> -->\n</div>\n', "</div>", '<div class="video-poster-thumbnail-bottom" >', '<button class="btn-default btn-large " video-poster-thumbnail-save >\u4fdd\u5b58\u5c01\u9762</button>', '<button class="btn-sub btn-large " video-upload-image-btn >\u91cd\u65b0\u4e0a\u4f20</button>', "</div>", "</div>"].join(""),
				o = this;
			o.imageDialog && o.imageDialog.close(), o.imageDialog = new $.dialog({
				title: "\u4e0a\u4f20\u89c6\u9891\u5c01\u9762",
				html: '<div class="video-poster-thumbnail" video-poster-thumbnail ></div>',
				width: 790,
				height: 440,
				show: !0,
				holderClassName: "video-poster-thumbnail-dialog",
				draggable: !1
			});
			var a = $(i),
				o = this;
			o.imageDialog.element.find("[video-poster-thumbnail]").append(a);
			var n = function(t, e) {
				if(t) {
					if(!/image\/\w+/.test(t.type)) return alert("\u8bf7\u4e0a\u4f20\u56fe\u7247\uff01"), void 0;
					var i = new FileReader;
					i.onload = function() {
						var t = window.btoa(this.result.toString()),
							i = "data:image/jpeg;base64, " + t,
							o = e.find(".img-container img");
						o.tbattr("src", i);
						var a = {
							viewMode: 1,
							aspectRatio: 16 / 9,
							preview: ".video-poster-thumbnail-dialog .img-preview",
							ready: function(t) {
								console.log(t.type)
							},
							cropstart: function(t) {
								console.log(t.type, t.detail.action)
							},
							cropmove: function(t) {
								console.log(t.type, t.detail.action)
							},
							cropend: function(t) {
								console.log(t.type, t.detail.action)
							},
							crop: function(t) {
								t.detail, console.log(t.type)
							},
							zoom: function(t) {
								console.log(t.type, t.detail.ratio)
							}
						};
						r && r.destroy(), r = new Cropper(o[0], a)
					}, i.readAsBinaryString(t)
				}
			};
			n(t, o.imageDialog.element), o.imageDialog.element.on("click", "[video-poster-thumbnail-save]", function(t) {
				if(t.preventDefault(), 1 == e) return !1;
				$(this).removeClass("btn-default").addClass("btn-default-disabled").html("\u4e0a\u4f20\u4e2d..."), e = !0;
				var i = r.getCroppedCanvas(),
					a = i.toDataURL("image/jpeg");
				console.log("upload image size: ", a.length), l(a, function(t) {
					var e = o.mDialog.element.find("[video-poster-thumbnail-preview]"),
						i = 0;
					o.postParam.thumbnail_url = t.pic_water.replace(/^http:\/\/imgsrc/g, "https://imgsa"), o.postParam.thumbnail_pic_id = t.pic_id, o.postParam.thumbnail_width = t.fullpic_width, o.postParam.thumbnail_height = t.fullpic_height, o.imageDialog.close(), o.imageDialog = null, e.on("error", function() {
						i || (setTimeout(function() {
							e.tbattr("src", o.postParam.thumbnail_url + "?t=" + (new Date).getTime())
						}, 100), ++i)
					}), e.show().tbattr("src", o.postParam.thumbnail_url), o.mDialog.element.find("[video-poster-thumbnail-preview-btn]").show()
				})
			}).on("click", "[video-upload-image-btn]", function() {
				o.mDialog.element.find("[video-poster-thumbnail-input]").trigger("click")
			});
			var r = null,
				s = null,
				l = function(t, e) {
					if(void 0 != t && "" != t) {
						var i = t.replace("data:image/jpeg;base64,", ""),
							a = {
								file: i
							};
						s = $.ajax({
							type: "POST",
							data: a,
							url: o.URLS.uploadImage,
							success: function(t) {
								0 == t.err_no ? e && e(t.info) : (o.sendMonitor({
									msg: "image upload file fail",
									data: t
								}), alert("\u4e0a\u4f20\u5931\u8d25.[" + JSON.stringify(t) + "]"))
							},
							error: function(t) {
								o.sendMonitor({
									msg: "image upload file fail",
									data: data
								}), alert("\u4e0a\u4f20\u5931\u8d25.[" + JSON.stringify(t) + "]")
							}
						})
					}
				}
		},
		uploadVideoFile: function(t) {
			var e = this,
				i = t.name.split("."),
				o = i[i.length - 1];
			t.size, e.videoTypeAccess.indexOf(o.toLowerCase()) < 0 ? e.mDialog.element.find("[video-upload-errtip]").html("\u6682\u4e0d\u652f\u6301\u6b64\u683c\u5f0f") : t.size > 5e8 ? e.mDialog.element.find("[video-upload-errtip]").html("\u76ee\u524d\u4ec5\u652f\u6301\u4e0a\u4f20500M\u4ee5\u5185\u89c6\u9891\uff0c\u4e4b\u540e\u5c06\u5f00\u901a\u5927\u5c3a\u5bf8\u4e0a\u4f20") : e.showUploadDetailPage(t)
		},
		showUploadFrontPage: function() {
			var t = this,
				e = "//tb2.bdstatic.com/tb/img/upload-icon_f553c69.png",
				i = "//tb2.bdstatic.com/tb/img/url-icon_7458fa6.png",
				o = ["1.\u4e0a\u4f20:\u5c06\u89c6\u9891\u4e0a\u4f20\u81f3\u670d\u52a1\u5668", "2.\u5ba1\u6838:\u4e0a\u4f20\u5b8c\u6210\u540e\u5373\u8fdb\u5165\u5ba1\u6838\uff0c\u6b64\u9636\u6bb5\u9700\u8981\u4e00\u6bb5\u65f6\u95f4\uff0c\u8bf7\u7a0d\u5019", "3.\u8f6c\u7801:\u5ba1\u6838\u5b8c\u6210\u540e\uff0c\u670d\u52a1\u5668\u5c06\u89c6\u9891\u8f6c\u7801\u6210\u64ad\u653e\u5668\u53ef\u8bc6\u522b\u7684\u683c\u5f0f", "4.\u53d1\u5e03:\u5ba1\u6838\u8f6c\u7801\u5b8c\u6210\u540e\uff0c\u89c6\u9891\u6b63\u5f0f\u53d1\u5e03"].join("<br>");
			this.postStepInfo = o;
			var a = ["\u76ee\u524d\u6211\u4eec\u652f\u6301\u7684\u89c6\u9891\u683c\u5f0f\u6709\uff1a", "\u5e38\u89c1\u5728\u7ebf\u6d41\u5a92\u4f53\u683c\u5f0f\uff1amp4\u3001flv\u3001f4v\u3001webm", "\u79fb\u52a8\u8bbe\u5907\u683c\u5f0f\uff1am4v\u3001mov\u30013gp", "realplayer\uff1arm\u3001rmvb\u3001ram", "\u5fae\u8f6f\u683c\u5f0f\uff1awmv\u3001avi\u3001asf", "MPEG\u89c6\u9891\uff1ampg\u3001mpeg", "DV\u89c6\u9891: .dvix .dv", "\u5176\u4ed6\u683c\u5f0f\uff1avob\u3001dat\u3001mkv\u3001cpk\u3001qt\u3001fli\u3001flc\u3001mod"].join("<br>");
			this.supportStepInfo = a;
			var n = ["\u9ad8\u6e05(360P): \u89c6\u9891\u5206\u8fa8\u7387 >= 640 x 360\uff0c\u89c6\u9891\u7801\u7387 >= 800kbps", "\u8d85\u6e05(720P): \u89c6\u9891\u5206\u8fa8\u7387 >= 960 x 540\uff0c\u89c6\u9891\u7801\u7387 >= 1500kbps", "\u84dd\u5149(1080P): \u89c6\u9891\u5206\u8fa8\u7387 >= 1920 x 1080\uff0c\u89c6\u9891\u7801\u7387 >= 2500kbps"].join("<br>");
			this.videoClarityInfo = n;
			var r = ["1.\u89c6\u9891\u5efa\u8bae\u4e0d\u8981\u8fc7\u4e8e\u6a21\u7cca\uff0c\u5206\u8fa8\u7387\u4e0d\u53ef\u4f4e\u4e8e640*360(\u6e05\u6670\u5ea6\u6807\u6e05)", "2.\u89c6\u9891\u5927\u5c0f\u4e0d\u8d85\u8fc7500M\uff0c\u4e4b\u540e\u5c06\u5f00\u901a\u5927\u5c3a\u5bf8\u4e0a\u4f20\u8ba1\u5212\uff0c\u656c\u8bf7\u671f\u5f85"].join("<br>");
			this.videoSizeInfo = r;
			var s = ["<div drag-upload >", '<div class="video-poster-local-upload-btn-wrap" >', "<div>", '<button class="btn-default  video-poster-local-upload-btn" video-upload-btn ><img src="' + e + '" class="video-poster-local-upload-icon"><span>\u672c\u5730\u4e0a\u4f20</span></button>', '<input type="file" accept="*" class="video-upload-file-input" video-upload-file-input >', '<div class="video-upload-errtip"  video-upload-errtip ></div>', "</div>", '<div><a class="video-poster-add-url-btn" video-poster-add-url-btn ><img src="' + i + '" class="video-poster-add-url-icon">\u6dfb\u52a0\u94fe\u63a5</a></div>', "</div>", '<div class="video-poster-bottom" >', '<p  class="video-poster-bottom-wraning" > <a href="http://tieba.baidu.com/hermes/feedback?red_tag=j2018546882" target="_blank">\u5efa\u8bae\u53cd\u9988\u70b9\u8fd9\u91cc</a></p>', '<p  class="video-poster-bottom-subinfo">', '<a data-text="' + r + '" >\u5927\u5c0f\u9650\u5236</a>&nbsp;', '<a data-text="' + o + '">\u53d1\u5e03\u6d41\u7a0b</a>&nbsp;', '<a data-text="' + a + '">\u652f\u6301\u683c\u5f0f</a>&nbsp;', "</div>", "</div>"].join("");
			this.mDialog && this.mDialog.close(), this.mDialog = new $.dialog({
				title: "\u53d1\u5e03\u89c6\u9891\u8d34",
				html: '<div class="video-poster" video-poster ></div>',
				width: 550,
				height: 410,
				show: !1,
				resizeable: !0,
				holderClassName: "video-poster-dialog"
			});
			var l = $(s);
			this.mDialog.element.find("[video-poster]").append(l), this.mDialog.element.on("dragover", function(e) {
				e.preventDefault(), e.stopPropagation(), t.mDialog.element.find("[drag-upload]").css({
					opacity: .5
				})
			}).on("drop", function(e) {
				if(e.preventDefault(), e.stopPropagation(), !window.FileReader) return alert("\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6b64\u529f\u80fd\uff0c\u8bf7\u4f7f\u7528\u652f\u6301HTML5\u7684\u6d4f\u89c8\u5668"), !1;
				t.mDialog.element.find("[drag-upload]").css({
					opacity: 1
				});
				var i = e.originalEvent.dataTransfer.files;
				if(i[0]) {
					var o = i[0];
					t.option.editor.getContent() ? t.showRemovePostContentWarningPage(function() {
						t.uploadVideoFile(o)
					}) : t.uploadVideoFile(o), $.stats.track("\u65b0\u89c6\u9891\u4e0a\u4f20", "PC\u65b0\u89c6\u9891\u4e0a\u4f20\u7edf\u8ba1", "frs", "click")
				}
			}).on("click", "[video-upload-btn]", function(e) {
				if(e.preventDefault(), t.data === !1 && 1 === PageData.user.is_login) window.realname.show();
				else {
					if(!window.FileReader) return alert("\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6b64\u529f\u80fd\uff0c\u8bf7\u4f7f\u7528\u652f\u6301HTML5\u7684\u6d4f\u89c8\u5668"), !1;
					$.stats.track("\u89c6\u9891\u4e0a\u4f20\u6309\u94ae\u70b9\u51fb", "PC\u65b0\u89c6\u9891\u4e0a\u4f20\u7edf\u8ba1", "frs", "click"), t.option.editor.getContent() ? t.showRemovePostContentWarningPage(function() {
						t.mDialog.element.find("[video-upload-file-input]").trigger("click")
					}) : t.mDialog.element.find("[video-upload-file-input]").trigger("click")
				}
			}).on("mouseover", ".video-poster-bottom-subinfo a", function(e) {
				e.preventDefault();
				var i = $(this);
				t.showBubbleTip(i, i.attr("data-text"))
			}).on("mouseout", ".video-poster-bottom-subinfo a", function(e) {
				e.preventDefault();
				var i = $(this);
				t.closeBubbleTip(i)
			}).on("change", "[video-upload-file-input]", function() {
				if($(this), this.files && this.files[0]) {
					var e = this.files[0];
					t.uploadVideoFile(e)
				}
			}).on("click", "[video-poster-add-url-btn]", function() {
				t.mDialog.close(), $.stats.track("\u89c6\u9891\u89c6\u9891\u6309\u94ae\u70b9\u51fb", "PC\u65b0\u89c6\u9891\u4e0a\u4f20\u7edf\u8ba1", "frs", "click");
				var e = $.extend({}, t.option);
				t.requireInstance("ueditor/widget/ueditor_video/ueditor_video_url_dialog", e)
			}), this.mDialog.show()
		},
		showBubbleTip: function(t, e) {
			var i = '<div class="video-poster-bubble-tip "><span class="video-poster-bubble-tip-text ">' + e + '</span><span class="video-poster-bubble-tip-arrow ">\u25c6</span></div>';
			this.closeBubbleTip(t, e);
			var o = $(i);
			o.width(), t.css({
				position: "relative"
			});
			var a = {},
				n = {};
			e == this.videoSizeInfo ? a = {
				left: -75,
				width: 200
			} : e == this.postStepInfo ? a = {
				left: -150,
				width: 370
			} : e == this.supportStepInfo ? a = {
				left: -140,
				width: 330
			} : e == this.videoClarityInfo && (a = {
				left: -200,
				width: 400
			}, n = {
				marginLeft: "55%"
			}), o.css(a), o.find(".video-poster-bubble-tip-arrow").css(n), t.offset(), t.append(o)
		},
		closeBubbleTip: function(t) {
			var e = t.find(".video-poster-bubble-tip");
			e.length > 0 && e.remove()
		},
		strlen: function(t) {
			for(var e = 0, i = 0; i < t.length; i++) {
				var o = t.charCodeAt(i);
				o >= 1 && 126 >= o || o >= 65376 && 65439 >= o ? e++ : e += 2
			}
			return e
		}
	}
});
try {
	var uploadVideo = function(t) {
		this.blockUploadPreFn = t.blockUploadPreFn, this.blockUploadErrFn = t.blockUploadErrFn, this.blockUploadDoneFn = t.blockUploadDoneFn, this.uploadPreFn = t.uploadPreFn, this.uploadReadyFn = t.uploadReadyFn, this.uploadDoneFn = t.uploadDoneFn, this.uploadErrFn = t.uploadErrFn
	};
	uploadVideo.prototype = {
		blockSize: 2097152,
		ajaxInstance: null,
		uploadProcess: 0,
		uploadPause: 0,
		maxRetry: 5,
		retryIndex: 0,
		blockCount: 0,
		uploadUrl: "/video/pc/uploadBlock",
		upload: function(t) {
			this.file = t, this.uploadProcess = 1, this.uploadPause = 0;
			var e = this,
				i = (t.name, t.size),
				o = Math.ceil(i / this.blockSize);
			this.blockCount = o;
			var a = t.name.split("."),
				n = a[a.length - 1];
			e.uploadPreFn && e.uploadPreFn(), console.log("\u8ba1\u7b97\u6587\u4ef6MD5\uff0c\u6bd4\u8f83\u8017\u65f6"), setTimeout(function() {
				e.computeBigFileFakeMd5(t, 0, function(a) {
					console.log("\u8ba1\u7b97\u6587\u4ef6MD5\uff0c\u8ba1\u7b97\u5b8c\u6bd5", a);
					var r = {
						block_no: 0,
						block_num: o,
						total_len: i,
						video_md5: a,
						video_format: n,
						file: t,
						upload_id: ""
					};
					e.uploadReadyFn && e.uploadReadyFn(r), e.uploadSinglePart(r)
				})
			}, 1)
		},
		computeBigFileFakeMd5: function(t, e, i) {
			var o = this;
			this.fileAllPartsMD5 || (this.fileAllPartsMD5 = ""), this.computeFileMd5(t, e, e + o.blockSize, function(a) {
				if(console.log("\u8ba1\u7b97\u6587\u4ef6\u5355\u5757MD5\uff0c\u8ba1\u7b97\u5b8c\u6bd5", a), console.log("\u76ee\u524d\u8ba1\u7b97\u5927\u5c0f", e, "\u4e00\u5171", t.size), o.fileAllPartsMD5 += a, e >= t.size) {
					var n = CryptoJS.algo.MD5.create();
					n.update(CryptoJS.enc.Latin1.parse(o.fileAllPartsMD5));
					var r = n.finalize();
					i && i(r.toString())
				} else e += o.blockSize, o.computeBigFileFakeMd5(t, e, i)
			})
		},
		computeFileMd5: function(t, e, i, o) {
			console.log(typeof t);
			var a = CryptoJS.algo.MD5.create(),
				n = new FileReader;
			if(n.onload = function(t) {
					a.update(CryptoJS.enc.Latin1.parse(t.target.result));
					var e = a.finalize();
					console.log(e.toString()), o(e.toString())
				}, t.slice) var t = t.slice(e, i);
			else if(t.webkitSlice) var t = t.webkitSlice(e, i);
			else if(File.prototype.mozSlice) var t = blofileBlobb.mozSlice(e, i);
			n.readAsBinaryString(t)
		},
		cancel: function() {
			this.ajaxInstance && this.ajaxInstance.abort(), this.uploadPause = 1, this.uploadProcess = 3
		},
		uploadSinglePart: function(t) {
			var e = t.block_no,
				i = t.block_num,
				o = t.file;
			if(e > i) return !0;
			var a = this;
			a.uploadProcess = 2;
			var n = e * this.blockSize,
				r = Math.min(o.size, n + this.blockSize),
				s = new FormData,
				l = o.slice(n, r);
			console.log("\u8ba1\u7b97\u5206\u5757MD5\uff0c\u7565\u5fae\u8017\u65f6", "start", n, "end", r), this.computeFileMd5(o, n, r, function(d) {
				var p = d;
				console.log("\u8ba1\u7b97\u5206\u5757MD5\uff0c\u8ba1\u7b97\u5b8c\u6bd5", d), s.append("block_no", e + 1), s.append("block_num", i), s.append("block_md5", p), s.append("block_len", r - n), s.append("total_len", o.size), s.append("video_md5", t.video_md5), s.append("video_format", t.video_format), s.append("upload_id", t.upload_id), s.append("tbs", PageData.tbs), s.append("block_data", l), a.blockUploadPreFn && a.blockUploadPreFn(s), a.ajaxInstance = $.ajax({
					url: a.uploadUrl,
					type: "POST",
					data: s,
					async: !0,
					processData: !1,
					contentType: !1,
					success: function(o) {
						if(0 != o.no) return a.retryIndex > a.maxRetry ? (console.log("error:", o, " \u91cd\u8bd5\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458"), alert(o.msg ? o.msg : JSON.stringify(o)), a.uploadProcess = 5, a.blockUploadErrFn && a.blockUploadErrFn(s), a.uploadErrFn && a.uploadErrFn(t)) : (console.log("error:", o, a.retryIndex + "\u6b21\u91cd\u8bd5\u4e2d... "), a.retryIndex++, a.blockUploadErrFn && a.blockUploadErrFn(t, a.retryIndex), setTimeout(function() {
							a.uploadSinglePart(t)
						}, 200 * a.retryIndex)), !1;
						var n = o.data;
						if(console.log("\u4e0a\u4f20\u5206\u5757\u6210\u529f:" + e + " / " + i), a.blockUploadDoneFn && a.blockUploadDoneFn(e + 1, i), e++, n.video_url || e > a.blockCount) {
							console.log("\u4e0a\u4f20\u6587\u4ef6\u6210\u529f:" + n.video_url), a.uploadProcess = 4;
							var r = {
								video_md5: t.video_md5,
								block_num: t.block_num,
								video_url: n.video_url,
								total_len: t.total_len,
								video_format: t.video_format,
								upload_id: t.upload_id
							};
							return a.uploadDoneFn && a.uploadDoneFn(!0, r), !0
						}
						return 1 == a.uploadPause ? (a.uploadProcess = 5, !1) : (n && n.upload_id && (t.upload_id = n.upload_id), t.block_no = e, s = null, a.uploadSinglePart(_.extend({}, t)), t = null, void 0)
					},
					error: function(t) {
						a.blockUploadErrFn && a.blockUploadErrFn(s), alert(t ? JSON.stringify(t) : "\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"), console.error("error:", t)
					}
				})
			})
		}
	}
} catch(err) {}
_.Module.define({
	path: "ueditor/widget/ueditor_video",
	requires: ["ueditor/widget/ueditor_video/ueditor_url_video", "ueditor/widget/ueditor_video/ueditor_local_video"],
	sub: {
		$btn: null,
		videoUploadBubble: null,
		tempHTML: ['<div class="v_layer_content j_content">', '<ul class="v_ul clearfix"><li class="v_url_btn" ><a href="#" onclick="return false;" class="v_url_bg"></a></li><li class="v_local_btn"><a a href="#" onclick="return false;"  class="v_url_container" ></a><a href="#" onclick="return false;" class="v_local_bg" ></a></li></ul></div>'].join(""),
		initial: function(t) {
			if(this.fuckCDN = !0, this.option = t, t.isVideoPgcUser) {
				this.$btn = t.$btn ? t.$btn : "";
				var e = $.cookie(window.PageData.user.id + "_FRSVideoUploadTip");
				e || this.initVideoUploadBubble({
					wrap: t.$btn
				}), this.bindNewEvent()
			} else this.initVideoUrlLayer(t)
		},
		initVideoUrlLayer: function(t) {
			this.isOfficialFroum = t.isOfficialFroum, this.CAN_LOCAL_UPLOAD = t.CAN_LOCAL_UPLOAD, this.init(t.container)
		},
		init: function(t) {
			var e = this,
				i = this.CAN_LOCAL_UPLOAD;
			e.j_con = t, 1 == i ? e.bindEvent() : e.urlVideo ? e.urlVideo.init(e.j_con) : (e.urlVideo = e.requireInstance("ueditor/widget/ueditor_video/ueditor_url_video", {
				parent: e
			}), e.urlVideo.init(e.j_con))
		},
		bindEvent: function() {
			var t = this;
			t.j_con.find(".v_url_btn").click(function(e) {
				e.preventDefault(), e.stopPropagation(), t.urlVideo ? t.urlVideo.init(t.j_con) : (t.urlVideo = t.requireInstance("ueditor/widget/ueditor_video/ueditor_url_video", {
					parent: t
				}), t.urlVideo.init(t.j_con)), t.trigger("closelocalvideo")
			});
			var e = t.j_con.find(".v_url_container");
			e.mouseenter(function() {
				e.addClass("v_url_container_hover")
			}).mouseleave(function() {
				e.removeClass("v_url_container_hover")
			}), t.localVideo ? t.localVideo.init({
				parent: t,
				j_con: t.j_con.find(".v_url_container")[0]
			}) : t.localVideo = t.requireInstance("ueditor/widget/ueditor_video/ueditor_local_video", {
				parent: t,
				j_con: t.j_con.find(".v_url_container")[0]
			})
		},
		destroy: function() {
			this.j_con = null
		},
		initVideoUploadBubble: function(t) {
			var e = {
				arrow_dir: "up",
				bubble_css: {
					top: 15,
					left: -50,
					width: 140,
					height: 50,
					zIndex: 6e4
				},
				arrow_pos: {
					left: 65
				},
				wrap: t.wrap,
				closeBtn: !0,
				content: "\u7535\u8111\u4e5f\u53ef\u4ee5\u53d1\u89c6\u9891\u8d34\u5566"
			};
			this.videoUploadBubble = this.requireInstance("tbui/widget/bubble_tip", [e]), this.videoUploadBubble.showBubble(), $.cookie(window.PageData.user.id + "_FRSVideoUploadTip", 1, 31536e3), this.videoUploadBubble.bind("onclose", function() {
				return !0
			});
			var i = this;
			setTimeout(function() {
				i.videoUploadBubble.closeBubble()
			}, 5e3)
		},
		bindNewEvent: function() {
			var t = this;
			this.$btn && this.$btn.on("click", ".edui-icon-video", function() {
				t.videoUploadBubble && t.videoUploadBubble.closeBubble(), this.uploadVideo = t.requireInstance("ueditor/widget/ueditor_video/ueditor_video_dialog", {
					parent: t,
					editor: t.option.editor,
					model: t.option.model
				})
			}).on("click", ".ui_bubble_closed", function() {
				t.videoUploadBubble && t.videoUploadBubble.closeBubble()
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/video",
	requires: ["poster/widget/post_manager", "ueditor/widget/ueditor_video"],
	sub: {
		initial: function(e, t, i) {
			e = e || window.UE, t = t || window.EditorUI, i || (i = {}), this.fuckCDN = !0, this.isVideoPgcUser = i.is_video_pgc_user, this.initPlugin(e, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(e, t, this), this.postManager = this.requireInstance("poster/widget/post_manager"), this.initPostDataProcessor(), this.initPostValidate()
		},
		initPlugin: function(e) {
			this.isVideoPgcUser;
			e.plugins.video = function() {
				function t(e) {
					e.title = e.title || e.swf_url, e.vsrc = e.html_url, e.url = decodeURI(e.html_url), e.url.toLowerCase().indexOf("baidu.com") > -1 ? (e.width = 480, e.height = 410) : e.url.toLowerCase().indexOf("player.video.qiyi.com") > -1 ? (e.width = 500, e.height = 415) : (e.width = 500, e.height = 450);
					var t = '<img unselectable="on" class="BDE_Flash" src="//tb2.bdstatic.com/tb/img/flash_6e8a391.png" data-video_url="#{url}" data-vsrc="#{vsrc}" data-pkey="#{pkey}" data-vpic="#{vpic}" title="#{title}" width="219" height="175" data-width="#{width}" data-height="#{height}"' + ("null" != e.html5 ? ' data-html5_url="#{html5}"' : "") + "><br/>",
						i = $.tb.format(t, e);
					return i
				}

				function i(e) {
					return e.replace(/<img[^>]*class="?(?:BDE_Flash|BDE_Music)[^>]*>/gi, function(e) {
						var t = e.replace(/.* title\="?([^\s">]+).*/i, "$1").replace(/&amp;/gi, "&"),
							i = e.replace(/.* data\-width\="?([^\s">]+).*/i, "$1"),
							a = e.replace(/.* data\-height\="?([^\s">]+).*/i, "$1"),
							r = e.replace(/.* class="?([^\s">]+).*/i, "$1"),
							n = "",
							o = "",
							s = '<embed allowfullscreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" scale="noborder"' + (0 == t.toLowerCase().indexOf("http://player.ku6.com") ? ' flashvars="adss=0"' : " ") + 'src="' + t + '"  class="' + r + '" width="' + i + '" height="' + a + '" ';
						if("BDE_Flash" == r) {
							n = e.replace(/.* data-video_url="?([^\s">]+).*/i, "$1").replace(/&amp;/gi, "&"), o = e.match(/.* data-html5_url="?([^\s">]+).*/i), o && (o = o[1].replace(/&amp;/gi, "&"), s += ' vhsrc="' + o + '"');
							var d = e.replace(/.* data-vsrc="?([^\s">]+).*/i, "$1").replace(/&amp;/gi, "&"),
								l = e.replace(/.* data-pkey="?([^\s">]+).*/i, "$1"),
								c = e.replace(/.* data-vpic="?([^\s">]+).*/i, "$1").replace(/&amp;/gi, "&");
							"null" != l && l.length < 40 && (s += ' vsrc="' + d + '"', "null" != c && (s += ' vpic="' + c + '"'), s += ' pkey="' + l + '"')
						}
						return s += " ><br/>"
					})
				}

				function a(t, a) {
					e.utils.each(t.getNodesByTagName("img"), function(t) {
						if("BDE_Flash" == t.getAttr("class") && a) {
							var r = i(t.toHtml());
							t.parentNode.replaceChild(e.uNode.createElement(r), t)
						}
					})
				}
				var r = this;
				r.addOutputRule(function(e) {
					a(e, !0)
				}, !0), r.addInputRule(function(e) {
					a(e, !1)
				}), r.getVideoNumber = function() {
					return $(r.body).find(".BDE_Flash").size()
				}, r.hasLocalVideo = function() {
					return $(r.body).find(".BDE_Flash").filter(function() {
						var e = $(this).data("pkey");
						return null != e && "" != e && "pkey_" == e.substr(0, 5)
					}).size() > 0
				}, r.getVideoUrl = function() {
					var e = $(r.body).find(".BDE_Flash");
					return e.size() > 0 ? e.data("vsrc") : null
				}, r.getFileId = function() {
					var e = r.getVideoUrl(),
						t = r.hasLocalVideo();
					return t && e.length > 0 ? e.substr(5) : ""
				}, r.commands.insertvideo = {
					execCommand: function(i, a) {
						a = e.utils.isArray(a) ? a : [a];
						for(var n, o = [], s = 0, d = a.length; d > s; s++) n = a[s], o.push(t(n));
						r.execCommand("inserthtml", o.join(""), !0)
					},
					queryCommandState: function() {
						var e = r.selection.getRange().getClosedNode(),
							t = e && "BDE_Video" == e.className;
						return t ? 1 : 0
					}
				}, r.addListener("aftergetcontent", function(t, i) {
					e.utils.each(i.getNodesByTagName("embed"), function(e) {
						if("BDE_Flash" == e.getAttr("class")) {
							e.setAttr("src", e.getAttr("src").replace(/&amp;/g, "&"));
							var t = e.getAttr("vsrc");
							t && e.setAttr("vsrc", t.replace(/&amp;/g, "&"));
							var i = e.getAttr("vhsrc");
							i && e.setAttr("vhsrc", i.replace(/&amp;/g, "&"))
						}
					})
				});
				var n = r.getExtendContent && r.getExtendContent;
				r.getExtendContent = function() {
					var e = {
						videoNumber: r.getVideoNumber(),
						hasLocalVideo: r.hasLocalVideo(),
						videoUrl: r.getVideoUrl(),
						fileId: r.getFileId()
					};
					return $.extend(n ? n() : {}, e)
				}
			}
		},
		initLayer: function(e, t) {
			var i = this.isVideoPgcUser;
			e.registerLayer("video", function(e, a, r) {
				if(i) return {};
				this.fuckCDN = !0;
				var n = {
						can_local_upload: '<div class="j_video_container video_container"><div class="v_layer_content j_content"><ul class="v_ul clearfix"><li class="v_url_btn" ><a href="#" onclick="return false;" class="v_url_bg"></a></li><li class="v_local_btn"><a a href="#" onclick="return false;"  class="v_url_container" ></a><a href="#" onclick="return false;" class="v_local_bg" ></a></li></ul></div></div>',
						normal: ['<div class="j_video_container video_container"><div class="v_layer_content j_content">', '<div style="padding:30px 0px 5px 30px" class="clearfix"><input type="text" class="v_layer_input form-control j_input" value="\u8bf7\u76f4\u63a5\u8f93\u5165\u89c6\u9891\u64ad\u653e\u9875\u5730\u5740"  ><a href="#" style="float:left;margin-left:5px;" class="btn_default btn_middle j_btn">\u63d2\u5165\u89c6\u9891</a></div>', '<div  class="j_error_tip v_error_tip" style="display:none;padding-left:30px;line-height:22px;"></div>', '<div style="color:#999;line-height:22px;padding-left:30px;" class="v_layer_text j_layer_text">\u76ee\u524d\u652f\u6301\u7231\u5947\u827a\u3001\u7f8e\u62cd\u3001\u4f18\u9177\u3001\u571f\u8c46\u3001\u641c\u72d0\u3001\u817e\u8baf\u3001\u4e50\u89c6\u7b49\u89c6\u9891\u7f51\u7ad9\u94fe\u63a5</div>', "</div></div>"].join("")
					},
					o = (r.can_local_upload, $.eduipopup().on("beforeshow", function() {
						var i = o.edui().getBodyContainer(),
							a = $(n.normal);
						if(i.html(""), i.append(a), e.getValue("UeditorVideo")) e.getValue("UeditorVideo").init(a);
						else {
							var r = t.requireInstance("ueditor/widget/ueditor_video", [{
								container: a,
								CAN_LOCAL_UPLOAD: 0
							}]);
							e.setValue("UeditorVideo", r), r.bind("insertvideo", function(t, i) {
								e.trigger("insertvideo", i)
							})
						}
					}).on("afterhide", function() {
						var t = e.getValue("UeditorVideo");
						t && t.trigger("closelocalvideo")
					}));
				return e.setWidget(o), o
			})
		},
		initModel: function(e) {
			this.isVideoPgcUser;
			e.registerModel("video", function() {
				var t = new e.EditorModel;
				this.fuckCDN = !0, e.bindLayer("video", t);
				var i = $.eduibutton({
					icon: "video",
					title: "\u63d2\u5165\u89c6\u9891"
				});
				return t.setButton(i), t
			})
		},
		initAdapter: function(e, t, i) {
			var a = this.isVideoPgcUser;
			e.registerUI("video", function(e) {
				var r = this;
				this.fuckCDN = !0;
				var n = t.getModel(e),
					o = n.getButton();
				if(a) {
					var s = i.requireInstance("ueditor/widget/ueditor_video", [{
						$btn: o,
						isVideoPgcUser: a,
						editor: r,
						model: n
					}]);
					s.bind("insertvideo", function(e, t) {
						n.trigger("insertvideo", t)
					}), n.bind("insertvideo", function(e, t) {
						r.execCommand("insertvideo", t)
					})
				} else {
					var d = n.getWidget();
					o.click(function() {
						d.parent().length || r.$container.find(".edui-dialog-container").append(d), "none" === d.css("display") ? d.css("zIndex", r.options.zIndex + 1).edui().show(o, {
							offsetTop: -10,
							offsetLeft: 85,
							caretLeft: 105,
							caretTop: -8
						}) : d.edui().hide(), $.stats.track("video_btn", "ueditor")
					}), d.edui().register("click", d, function(e) {
						o[0] === e.target || $.contains(o[0], e.target) || d.edui().hide()
					}), n.bind("insertvideo", function(e, t) {
						r.execCommand("insertvideo", t), d.edui().hide()
					})
				}
				return n.getButton()
			})
		},
		initPostDataProcessor: function() {
			this.postManager.addPostDataProcess(function(e) {
				var t = (e.context || {}, e.editorExtendContent || {}),
					i = {};
				return t.videoNumber > 0 ? (i.video_url = t.videoUrl, t.hasLocalVideo && (i.file_id = t.fileId), i) : !1
			})
		},
		initPostValidate: function() {
			this.postManager.addPostValidate(function(e) {
				var t = (e.context || {}, e.editorExtendContent || {});
				if(t.videoNumber > 1) {
					var i = "\u62b1\u6b49\uff0c\u6bcf\u5c42\u697c\u63d2\u5165\u7684\u89c6\u9891\u4e2a\u6570\u4e0d\u80fd\u8d85\u8fc71\u4e2a\uff0c\u8bf7\u4fee\u6539\u540e\u91cd\u65b0\u63d0\u4ea4";
					return i
				}
				return !0
			})
		}
	}
});
_.Module.define({
	path: "tbui/widget/sketchpad/sketchpad_core",
	sub: {
		template: '<canvas class="sketchpad_bg"></canvas>         <canvas class="sketchpad_result"></canvas>         <canvas class="sketchpad_mask"></canvas>         <textarea class="sketchpad_text_input" style="display: none;"></textarea>',
		defaultOptions: {
			width: 400,
			height: 300,
			fixCanvas: !1,
			onhistorychange: function() {}
		},
		initial: function(t, e) {
			e = $.extend({}, this.defaultOptions, e);
			var i = this;
			this.element = $(t);
			var s = $(this.template);
			s.filter("canvas").each(function() {
				this.width = e.width, this.height = e.height
			}), this.element.addClass("sketchpad").css({
				width: e.width,
				height: e.height
			}).append(s), this.fixCanvas = e.fixCanvas, this.history = [], this.onhistorychange = e.onhistorychange, this.redoStack = [], this.clearState = !1, this.bgCanvas = this.element.find(".sketchpad_bg"), this.bgContext = this.bgCanvas[0].getContext("2d"), this.mouseDownHandler = this._mouseDownLineHandler, this.mouseUpHandler = this._mouseUpLineHandler, this.mouseMoveHandler = this._mouseMoveLineHandler, this.initCanvas(), this.initTextInput(), this.currentCommand = null, this.setPaintType("brush"), this.setPaintShape("rect"), this.setLineWidth(3), this.setPaintColor("black"), this.setPaintFontSize(12), this.refreshPosition(), this.element.on("dragover", function(t) {
				t.preventDefault(), t.stopPropagation()
			}), this.element[0].addEventListener("drop", function(t) {
				t.preventDefault(), t.stopPropagation();
				var e = t.dataTransfer.files[0],
					s = new FileReader;
				s.onload = function(t) {
					var e = new Image;
					e.onload = function() {
						i.setBackgroundImage(e)
					}, e.src = t.target.result
				}, s.readAsDataURL(e)
			})
		},
		initTextInput: function() {
			this.textInput = this.element.find(".sketchpad_text_input")
		},
		initCanvas: function() {
			var t = this;
			this.resultCanvas = this.element.find(".sketchpad_result"), this.resultContext = this.resultCanvas[0].getContext("2d"), this.maskCanvas = this.element.find(".sketchpad_mask"), this.maskContext = this.maskCanvas[0].getContext("2d"), this.maskCanvas.on("click", function(e) {
				if("text" == t.paintType)
					if(t.textDrawing) {
						t.textDrawing = !1;
						var i = t.textInput.val();
						if(i.length > 0) {
							var s = t.textInput[0].offsetLeft + 1,
								n = t.textInput[0].offsetTop,
								o = t.drawText(t.resultContext, i, s, n, t.textInput.innerWidth());
							t._pushHistory(o), t.textInput.val("")
						}
						t.textInput.hide()
					} else {
						t.textDrawing = !0;
						var a = e.clientX - t.offset.left + (window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft),
							r = e.clientY - t.offset.top + (window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop);
						t.textInput.css({
							left: a,
							top: r
						}).show().focus()
					}
			}), this.maskCanvas.on("mousedown", function(e) {
				e.preventDefault(), t.mouseDownHandler(e)
			});
			var e = function(e) {
					t.mouseUpHandler(e)
				},
				i = function(e) {
					t.mouseMoveHandler(e)
				};
			$(document).on("mouseup", e).on("mousemove", i), t.clearEvents = function() {
				$(document).unbind("mouseup", e).unbind("mousemove", i)
			}
		},
		_mouseDownLineHandler: function(t) {
			var e = this;
			e.drawing = !0, e.iLastX = t.clientX - e.offset.left + (window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft), e.iLastY = t.clientY - e.offset.top + (window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop), e.drawPoint(e.resultContext, e.iLastX, e.iLastY, e.lineWidth), null == e.currentCommand && (e.currentCommand = {
				type: "brush",
				path: [],
				color: e.paintColor,
				lineWidth: e.lineWidth,
				clearState: e.clearState,
				startPoint: {
					x: e.iLastX,
					y: e.iLastY,
					diameter: e.lineWidth
				}
			})
		},
		_mouseMoveLineHandler: function(t) {
			var e = this;
			if(e.drawing) {
				var i = t.clientX - e.offset.left + (window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft),
					s = t.clientY - e.offset.top + (window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop),
					n = {
						fromX: e.iLastX,
						fromY: e.iLastY,
						toX: i,
						toY: s
					};
				e.drawLine(e.resultContext, n), e.currentCommand.path.push(n), e.iLastX = i, e.iLastY = s
			}
		},
		_mouseUpLineHandler: function() {
			var t = this;
			t.drawing && (t.drawing = !1, t.iLastX = -1, t.iLastY = -1, t._pushHistory(t.currentCommand), t.currentCommand = null)
		},
		_mouseDownShapeHandler: function(t) {
			var e = this;
			e.drawing = !0, e.iLastX = t.clientX - e.offset.left + (window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft), e.iLastY = t.clientY - e.offset.top + (window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop)
		},
		_mouseMoveShapeHandler: function(t) {
			var e = this;
			if(e.drawing) {
				e._clear(e.maskContext);
				var i = t.clientX - e.offset.left + (window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft),
					s = t.clientY - e.offset.top + (window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop);
				e.currentCommand = e.drawShape(e.maskContext, e.iLastX, e.iLastY, i - e.iLastX, s - e.iLastY)
			}
		},
		_mouseUpShapeHandler: function() {
			var t = this;
			t.drawing && (t.drawing = !1, t.iLastX = -1, t.iLastY = -1, t._clear(t.maskContext), t.currentCommand && (t.doCommand(t.currentCommand), t._pushHistory(t.currentCommand), t.currentCommand = null))
		},
		_mouseDownTextHandler: function() {},
		_mouseMoveTextHandler: function() {},
		_mouseUpTextHandler: function() {},
		_pushHistory: function(t) {
			this.history.push(t), this.onhistorychange(this.history, this.redoStack)
		},
		drawLine: function(t, e) {
			t.beginPath(), t.moveTo(e.fromX, e.fromY), t.lineTo(e.toX, e.toY), t.stroke()
		},
		drawPoint: function(t, e, i, s) {
			t.beginPath(), t.arc(e, i, s / 2, 0, 2 * Math.PI, !0), t.closePath(), t.fill()
		},
		drawPath: function(t, e) {
			var i = e.startPoint;
			this.drawPoint(t, i.x, i.y, i.diameter);
			for(var s = e.path, n = 0, o = s.length; o > n; n++) this.drawLine(t, s[n])
		},
		drawRect: function(t, e, i, s, n) {
			return t.strokeRect(e, i, s, n), {
				type: "shape",
				shape: "rect",
				x: e,
				y: i,
				width: s,
				height: n,
				color: this.paintColor,
				lineWidth: this.lineWidth
			}
		},
		drawEllipse: function(t, e, i, s, n) {
			var o = .5522848,
				a = s / 2 * o,
				r = n / 2 * o,
				l = e + s,
				d = i + n,
				h = e + s / 2,
				u = i + n / 2;
			return t.beginPath(), t.moveTo(e, u), t.bezierCurveTo(e, u - r, h - a, i, h, i), t.bezierCurveTo(h + a, i, l, u - r, l, u), t.bezierCurveTo(l, u + r, h + a, d, h, d), t.bezierCurveTo(h - a, d, e, u + r, e, u), t.closePath(), t.stroke(), {
				type: "shape",
				shape: "ellipse",
				x: e,
				y: i,
				width: s,
				height: n,
				color: this.paintColor,
				lineWidth: this.lineWidth
			}
		},
		drawText: function(t, e, i, s, n, o) {
			o = o || this.fontSize;
			var a = e.split(""),
				r = 1.2 * o,
				l = s;
			l += o;
			for(var d = 0, h = a.length, u = ""; h > d; d++) {
				var c = a[d];
				if("\n" == c) t.fillText(u, i, l), u = "", l += r;
				else {
					var p = u + c,
						f = t.measureText(p),
						m = f.width;
					m > n ? (t.fillText(u, i, l), u = c, l += r) : u = p
				}
			}
			return t.fillText(u, i, l), {
				type: "text",
				x: i,
				y: s,
				text: e,
				maxWidth: n,
				color: this.paintColor,
				fontSize: o
			}
		},
		setPaintType: function(t) {
			this.paintType = t, "shape" == t ? (this.mouseDownHandler = this._mouseDownShapeHandler, this.mouseUpHandler = this._mouseUpShapeHandler, this.mouseMoveHandler = this._mouseMoveShapeHandler) : "brush" == t ? (this.mouseDownHandler = this._mouseDownLineHandler, this.mouseUpHandler = this._mouseUpLineHandler, this.mouseMoveHandler = this._mouseMoveLineHandler) : (this.mouseDownHandler = this._mouseDownTextHandler, this.mouseUpHandler = this._mouseUpTextHandler, this.mouseMoveHandler = this._mouseMoveTextHandler), "text" == t ? this.element.css("cursor", "text") : this.element.css("cursor", "crosshair")
		},
		setClear: function(t) {
			this.clearState = t, this.resultContext.globalCompositeOperation = t ? "destination-out" : "source-over"
		},
		_setPaintColor: function(t) {
			this.resultContext.strokeStyle = t, this.maskContext.strokeStyle = t, this.resultContext.fillStyle = t, this.maskContext.fillStyle = t, this.textInput.css("color", t)
		},
		setPaintColor: function(t) {
			this._setPaintColor(t), this.paintColor = t
		},
		_setLineWidth: function(t) {
			this.resultContext.lineWidth = t, this.maskContext.lineWidth = t, this.resultContext.lineCap = "round", this.maskContext.lineCap = "round"
		},
		setLineWidth: function(t) {
			this._setLineWidth(t), this.lineWidth = t
		},
		setPaintShape: function(t) {
			"rect" == t ? this.drawShape = this.drawRect : "ellipse" == t && (this.drawShape = this.drawEllipse)
		},
		setBackgroundImage: function(t) {
			if(this.fixCanvas) {
				var e = this.width / this.height,
					i = null,
					s = 0,
					n = 0;
				(t.width > this.width || t.height > this.height) && (t.width / t.height > e ? (i = t.width / this.width, t.width = this.width, t.height = t.height / i) : (i = t.height / this.height, t.height = this.height, t.width = t.width / i)), s = (this.width - t.width) / 2, n = (this.height - t.height) / 2, this._clear(this.bgContext), this.bgContext.drawImage(t, s, n, t.width, t.height)
			} else this.bgCanvas.tbattr({
				width: t.width,
				height: t.height
			}), this.resultCanvas.tbattr({
				width: t.width,
				height: t.height
			}), this.maskCanvas.tbattr({
				width: t.width,
				height: t.height
			}), this.element.css({
				width: t.width,
				height: t.height
			}), this.width = t.width, this.height = t.height, this.bgContext.drawImage(t, 0, 0);
			this.setPaintColor(this.paintColor), this.setLineWidth(this.lineWidth), this.setPaintFontSize(this.fontSize)
		},
		removeBackgroundImage: function() {
			this._clear(this.bgContext)
		},
		_setPaintFontSize: function(t) {
			this.resultContext.font = t + "px '\u5b8b\u4f53'", this.textInput.css("fontSize", t)
		},
		setPaintFontSize: function(t) {
			this._setPaintFontSize(t), this.fontSize = t
		},
		doCommand: function(t) {
			this.resultContext.save(), this.resultContext.strokeStyle = t.color, this.resultContext.fillStyle = t.color, "text" == t.type ? this.resultContext.font = t.fontSize + "px '\u5b8b\u4f53'" : this.resultContext.lineWidth = t.lineWidth, "shape" == t.type && "rect" == t.shape ? this.resultContext.strokeRect(t.x, t.y, t.width, t.height) : "shape" == t.type && "ellipse" == t.shape ? this.drawEllipse(this.resultContext, t.x, t.y, t.width, t.height) : "text" == t.type ? this.drawText(this.resultContext, t.text, t.x, t.y, t.maxWidth, t.fontSize) : "brush" == t.type && (this.resultContext.globalCompositeOperation = t.clearState ? "destination-out" : "source-over", this.drawPath(this.resultContext, t)), this.resultContext.restore()
		},
		_clear: function(t) {
			t.clearRect(0, 0, this.width, this.height)
		},
		clear: function() {
			this._clear(this.resultContext), this.history.length = 0, this.redoStack.length = 0, this.onhistorychange(this.history, this.redoStack)
		},
		undo: function() {
			this._clear(this.resultContext), this.redoStack.push(this.history.pop()), this.onhistorychange(this.history, this.redoStack);
			for(var t = 0, e = this.history.length; e > t; t++) this.doCommand(this.history[t])
		},
		redo: function() {
			var t = this.redoStack.pop();
			null != t && (this.doCommand(t), this._pushHistory(t))
		},
		destroy: function() {
			this.clearEvents(), this.element.html("")
		},
		refreshPosition: function() {
			this.offset = this.resultCanvas.offset(), this.width = this.resultCanvas.width(), this.height = this.resultCanvas.height()
		},
		getResult: function(t) {
			return t = t || "image/png", this.resultCanvas[0].toDataURL(t)
		},
		_dataURLtoBlob: function(t) {
			for(var e = atob(t.split(",")[1]), i = t.split(",")[0].split(":")[1].split(";")[0], s = new ArrayBuffer(e.length), n = new Uint8Array(s), o = 0; o < e.length; o++) n[o] = e.charCodeAt(o);
			var a = window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder;
			if(a) {
				var r = new a;
				return r.append(s), r.getBlob(i)
			}
			return Blob ? new Blob([s], {
				type: i
			}) : null
		},
		getResultAsBlob: function(t) {
			return t = t || "image/png", this._dataURLtoBlob(this.getResult(), t)
		}
	}
}), _.Module.define({
	path: "tbui/widget/sketchpad",
	requires: ["tbui/widget/sketchpad/sketchpad_core", "tbui/widget/image_uploader_manager"],
	sub: {
		template: ['<div class="tbui_sketchpad">', '<div class="tb_picasso_content"></div>', '<div class="sketchpad_v_toolbar">', "<ul>", "<li>", '<ul class="color_panel clearfix">', '<li><div style="background: #FFFFFF;border: 1px solid #FFFFFF;"></div></li>', '<li><div style="background: #B5B5B5;border: 1px solid #B5B5B5;"></div></li>', '<li><div style="background: #F79579;border: 1px solid #F79579;"></div></li>', '<li><div style="background: #FDC58B;border: 1px solid #FDC58B;"></div></li>', '<li><div style="background: #80C99C;border: 1px solid #80C99C;"></div></li>', '<li><div style="background: #000000;border: 1px solid #000000;"></div></li>', '<li><div style="background: #626262;border: 1px solid #626262;"></div></li>', '<li class="focus"><div style="background: #ED2329;border: 1px solid #ED2329;"></div></li>', '<li><div style="background: #F79323;border: 1px solid #F79323;"></div></li>', '<li><div style="background: #00A451;border: 1px solid #00A451;"></div></li>', '<li><div style="background: #6CCEF7;border: 1px solid #6CCEF7;"></div></li>', '<li><div style="background: #F499C0;border: 1px solid #F499C0;"></div></li>', '<li><div style="background: #00ACEE;border: 1px solid #00ACEE;"></div></li>', '<li><div style="background: #EC008B;border: 1px solid #EC008B;"></div></li>', '<li><div style="background: #D8003D;border: 1px solid #D8003D;"></div></li>', "</ul>", "</li>", '<li class="sketchpad_button_brush">', '<ul class="sketchpad_brush_panel clearfix">', '<li class="brush_button brush_small" data-brush-type="brush">1</li>', '<li class="brush_button brush_middle focus" data-brush-type="brush">3</li>', '<li class="brush_button brush_big" data-brush-type="brush">5</li>', "</ul>", "</li>", '<li class="sketchpad_button_eraser">', '<ul class="sketchpad_brush_panel clearfix">', '<li class="brush_button brush_small" data-brush-type="eraser">1</li>', '<li class="brush_button brush_middle" data-brush-type="eraser">3</li>', '<li class="brush_button brush_big" data-brush-type="eraser">5</li>', "</ul>", "</li>", "<li>", '<div class="sketchpad_bg_input">', '<button type="button" class="sketchpad_add_bg">\u6dfb\u52a0\u80cc\u666f</button>', '<input type="file" class="sketchpad_image_input" />', "</div>", "</li>", "<li>", '<button type="button" class="sketchpad_remove_bg disabled">\u5220\u9664\u80cc\u666f</button>', "</li>", "</ul>", "</div>", '<div class="sketchpad_h_toolbar">', '<button type="button" class="sketchpad_undo" disabled="disabled">\u4e0a\u4e00\u6b65</button>', '<button type="button" class="sketchpad_redo" disabled="disabled">\u4e0b\u4e00\u6b65</button>', '<button type="button" class="sketchpad_clear" disabled="disabled">\u6e05\u7a7a</button>', '<button type="button" class="sketchpad_finish">\u753b\u597d\u4e86</button>', "</div>", '<canvas class="sketchpad_sign" width="416" height="335"  style="display: none;" ></canvas>', '<div class="picasso_message" style="display: none;">', "<p>\u5c1a\u672a\u4f5c\u753b\uff0c\u767d\u7eb8\u4e00\u5f20\uff01&gt;.&lt;</p>", '<p><button type="button" class="picasso_message_apply">\u786e\u5b9a</button></p>', "</div>", "</div>"].join(""),
		_tbsURL: "//tieba.baidu.com/dc/common/imgtbs",
		_uploadURL: "https://uploadphotos.baidu.com/upload/pic",
		picItemPath: "https://imgsa.baidu.com/forum/pic/item/",
		uploading: !1,
		initial: function(t) {
			var e = this;
			e.container = $(t), e.container.html(this.template), e.currentColor = "#ED2329", e.brushType = "brush";
			var i = e.container.find(".tb_picasso_content");
			this.sketchpad = this.requireInstance("SketchpadCore", [i, {
				fixCanvas: !0,
				onhistorychange: function(t, i) {
					0 == t.length ? (e.undoButton.tbprop("disabled", !0), e.clearButton.tbprop("disabled", !0)) : (e.undoButton.tbprop("disabled", !1), e.clearButton.tbprop("disabled", !1)), 0 == i.length ? e.redoButton.tbprop("disabled", !0) : e.redoButton.tbprop("disabled", !1)
				}
			}]), this.sketchpad.setPaintColor("#ED2329"), e.container.find(".color_panel").on("click", "div", function() {
				var t = this.style.backgroundColor;
				$(this).parent().siblings(".focus").removeClass("focus").end().addClass("focus"), e.currentColor = t, "brush" == e.brushType && e.sketchpad.setPaintColor(t)
			}), e.brushButtons = e.container.find(".brush_button"), e.brushButtons.click(function() {
				e.brushButtons.filter(".focus").removeClass("focus");
				var t = $(this).addClass("focus"),
					i = t.data("brushType"),
					s = t.text() - 0;
				e.sketchpad.setLineWidth(s), "eraser" == i ? (e.sketchpad.setClear(!0), e.sketchpad.setPaintColor("black")) : (e.sketchpad.setClear(!1), e.sketchpad.setLineWidth(s), e.sketchpad.setPaintColor(e.currentColor)), e.brushType = i
			}), e.deleteBgButton = e.container.find(".sketchpad_remove_bg").click(function() {
				e.sketchpad.removeBackgroundImage(), e.deleteBgButton.addClass("disabled")
			}), e.undoButton = e.container.find(".sketchpad_undo").click(function() {
				e.sketchpad.undo()
			}), e.redoButton = e.container.find(".sketchpad_redo").click(function() {
				e.sketchpad.redo()
			}), e.clearButton = e.container.find(".sketchpad_clear").click(function() {
				e.sketchpad.clear()
			}), e.container.find(".sketchpad_finish").click(function() {
				if(1 == e.uploading) return !1;
				if(e.uploading = !0, 0 == e.sketchpad.history.length) return e.messagePanel.show(), void 0;
				var t = e.container.find(".sketchpad_sign")[0],
					i = t.getContext("2d");
				i.fillStyle = "#EEEEEE", i.fillRect(0, 0, 416, 335), i.fillStyle = "#FFFFFF", i.fillRect(8, 8, 400, 300), i.drawImage(e.sketchpad.bgCanvas[0], 8, 8, 400, 300), i.drawImage(e.sketchpad.resultCanvas[0], 8, 8, 400, 300);
				var s = "By " + PageData.user.name,
					n = i.measureText(s);
				i.font = "12px '\u5b8b\u4f53'", i.fillStyle = "black", i.fillText(s, 400 - n.width, 325), i.fillText("\u8d34\u5427\u6d82\u9e26", 8, 325), e._uploadImage(t)
			}), e.container.find(".sketchpad_add_bg").click(function() {
				e.container.find(".sketchpad_image_input").click()
			}), e.container.find(".sketchpad_image_input").change(function() {
				var t = this;
				if(t.files.length > 0) {
					var i = t.files[0];
					if(/^image/.test(i.type)) {
						var s = new FileReader;
						s.onload = function(t) {
							var i = new Image;
							i.onload = function() {
								e.sketchpad.setBackgroundImage(i), e.deleteBgButton.removeClass("disabled")
							}, i.src = t.target.result
						}, s.readAsDataURL(i)
					}
				}
			}), e.messagePanel = e.container.find(".picasso_message"), e.messagePanel.find(".picasso_message_apply").click(function() {
				e.messagePanel.hide()
			}), e.uploader = this.requireInstance("tbui/widget/image_uploader_manager")
		},
		_uploadImage: function(t) {
			var e = this;
			e.uploader.uploadBase64(t.toDataURL().replace(/^.*base64\,/, ""), function(t) {
				var i, s;
				0 != t.errorCode ? alert("\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u7a0d\u5019\u91cd\u8bd5") : (0 != t.response.error_code && alert("\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u7a0d\u5019\u91cd\u8bd5"), i = t.response.info.pic_id_encode, s = "https://imgsa.baidu.com/forum/pic/item/" + i + ".jpg", e.trigger("finish", s), e.destroy())
			})
		},
		refreshPosition: function() {
			this.sketchpad.refreshPosition()
		},
		destroy: function() {
			this.sketchpad.destroy(), this.container.html("")
		}
	}
});
_.Module.define({
	path: "ueditor/widget/scrawl",
	requires: ["tbui/widget/sketchpad"],
	sub: {
		initial: function(i, t) {
			i = i || window.UE, t = t || window.EditorUI, this.cdnCache = !0, this.initPlugin(i, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(i, t, this)
		},
		initPlugin: function() {},
		initLayer: function(i, t) {
			i.registerLayer("scrawl", function(i, e) {
				var a = '<div style="padding:10px;">\u54a6\uff0c\u6b64\u529f\u80fd\u9700\u8981\u62e5\u6709\u672c\u54276\u7ea7\u5934\u8854\u624d\u80fd\u4f7f\u7528\uff0c\u518d\u52aa\u529b\u4e00\u4e0b\uff01&nbsp;<a href="//tieba.baidu.com/f/like/level?ie=utf-8&kw=#{name}#level_main" target="_blank">\u67e5\u770b\u5347\u7ea7\u79d8\u7c4d</a></div>',
					n = function(t, e) {
						i.trigger("insertscrawl", e)
					};
				if(i.bind("show", function() {
						if(e.user.level >= 6) {
							t.init({
								forumName: e.forum.name,
								userName: e.user.name
							});
							var i = t;
							i.unbind("ok", n), i.bind("ok", n)
						}
					}), e.user.level < 6) {
					var s = $.eduipopup().on("beforeshow", function() {
						var i = s.edui().getBodyContainer();
						i.html($.tb.format(a, e.forum))
					});
					i.setWidget(s)
				}
			})
		},
		initModel: function(i) {
			i.registerModel("scrawl", function() {
				var t = new i.EditorModel;
				i.bindLayer("scrawl", t);
				var e = $.eduibutton({
					icon: "scrawl",
					title: ""
				});
				return t.setButton(e), t
			})
		},
		initAdapter: function(i, t) {
			i.registerUI("scrawl", function(i) {
				var e = this,
					a = this,
					n = t.getModel(i),
					s = n.getButton(),
					o = n.getWidget();
				return s.click(function() {
					n.trigger("show"), o && (o.parent().length || e.$container.find(".edui-dialog-container").append(o), o.css("zIndex", e.options.zIndex + 1).edui().show(s, {
						offsetTop: -10,
						caretLeft: 20,
						caretTop: -8
					})), $.stats.track("scrawl_btn", "ueditor")
				}), s.edui().register("click", s, function() {
					o && o.hide()
				}), n.bind("insertscrawl", function(i, t) {
					a.execCommand("insertimage", [{
						url: t,
						picType: 5,
						width: 416,
						height: 335
					}])
				}), s
			})
		},
		_layerModal: '<div class="p_layer_modal" id="j_sketchapad_modal" style="display:none;position:absolute;z-index:100;width:499px;height:396px;top:0px;left:0px;" ><div class="p_layer_modal_s"></div><div class="p_layer_modal_content"><p >\u60a8\u6b63\u5728\u7f16\u8f91\u6d82\u9e26\uff0c\u73b0\u5728\u9000\u51fa\u5c06\u4e0d\u4f1a\u4fdd\u5b58\uff0c\u60a8\u786e\u5b9a\u8981\u9000\u51fa\u5417\uff1f</p><div style="margin:30px auto;" ><a href="#" style="margin-right:30px;" class="btn_default btn_middle j_ok">\u786e \u5b9a</a><a href="#" class="btn_sub btn_middle j_cancel">\u53d6 \u6d88</a></div></div></div>',
		init: function(i) {
			this.options = i;
			var t = !!document.createElement("canvas").getContext;
			this._closeDialog = !1;
			var e = "undefined" != typeof FileReader;
			t && e ? this.canvas() : this.flash()
		},
		canvas: function() {
			var i = this,
				t = $("<div></div>");
			this.sketchpad = this.requireInstance("tbui/widget/sketchpad", t), t.append('<div class="p_layer_modal" id="j_sketchapad_modal" style="display:none;position:absolute;z-index:100;width:519px;height:396px;top:0px;left:0px;" ><div class="p_layer_modal_s"></div><div class="p_layer_modal_content"><p >\u60a8\u6b63\u5728\u7f16\u8f91\u6d82\u9e26\uff0c\u73b0\u5728\u9000\u51fa\u5c06\u4e0d\u4f1a\u4fdd\u5b58\uff0c\u60a8\u786e\u5b9a\u8981\u9000\u51fa\u5417\uff1f</p><div style="margin:30px auto;" ><a href="#" style="margin-right:30px;" class="btn_default btn_middle j_ok">\u786e \u5b9a</a><a href="#" class="btn_sub btn_middle j_cancel">\u53d6 \u6d88</a></div></div></div>'), this.sketchpad.bind("finish", function(t, e) {
				i.close(), i.trigger("ok", e)
			}), this.dialog = new $.dialog({
				title: "\u6d82\u9e26",
				width: 520,
				fixed: !1,
				draggable: !1,
				html: t
			}), this.dialog.bind("onclose", function() {
				return i._closeDialog ? void 0 : ($("#j_sketchapad_modal").show(), !1)
			}), $.browser.msie && $.browser.version < 7 && t.closest(".dialogJcontent").css({
				padding: "9px 0px 9px 9px;"
			}), this.sketchpad.refreshPosition(), this.eventInit()
		},
		close: function() {
			this._closeDialog = !0, this.dialog.close()
		},
		eventInit: function() {
			var i = this;
			$("#j_sketchapad_modal").find(".j_ok").click(function() {
				return i._closeDialog = !0, i.dialog.close(), !1
			}), $("#j_sketchapad_modal").find(".j_cancel").click(function() {
				return i._closeDialog = !1, $("#j_sketchapad_modal").hide(), !1
			})
		},
		flash: function() {
			var i = this,
				t = $('<div id="sketchpad_init" style="font-size:12px;line-height:340px;text-align:center">\u6d82\u9e26\u6b63\u5728\u521d\u59cb\u5316\u4e2d\uff0c\u8bf7\u7a0d\u5019...</div><div id="flash_sketchpad" ></div>' + i._layerModal);
			this.dialog = new $.dialog({
				title: "\u6d82\u9e26",
				width: 500,
				height: 340,
				html: t
			}), this.dialog.show(), $.browser.msie && $.browser.version < 7 && t.closest(".dialogJcontent").css({
				padding: "9px 0px 9px 9px;"
			}), this.dialog.bind("onclose", function() {
				return i._closeDialog ? void 0 : ($("#j_sketchapad_modal").show(), !1)
			}), this.eventInit(), i.insertFlash("flash_sketchpad", "picasso", "//tb2.bdstatic.com/tb/img/picasso_df6b152.swf", 490, 340, {
				upload_url: "https://uploadphotos.baidu.com/upload/pic",
				pic_url: "https://imgsa.baidu.com/forum/pic/item/",
				user_name: i.options.userName,
				forum_name: i.options.forumName
			})
		},
		insertFlash: function(i, t, e, a, n, s) {
			var o = this;
			new $.swf(e, {
				id: t,
				container: $("#" + i),
				width: a,
				height: n,
				params: {
					wmode: "transparent"
				},
				vars: s,
				callBacks: {
					jsReady: function() {
						return document.getElementById("flash_sketchpad").style.display = "block", document.getElementById("sketchpad_init").style.display = "none", !0
					},
					insertImage: function(i) {
						o.trigger("ok", i), o._closeDialog = !0, o.dialog.close()
					}
				}
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/jquery_caret",
	sub: {
		initial: function() {
			var e = document.createElement("input"),
				t = {
					setSelectionRange: "setSelectionRange" in e || "selectionStart" in e,
					createTextRange: "createTextRange" in e || "selection" in document
				},
				n = /\r\n/g,
				r = /\r/g,
				a = function(e) {
					return "undefined" != typeof e.value ? e.value : $(e).text()
				},
				o = function(e, t) {
					"undefined" != typeof e.value ? e.value = t : $(e).text(t)
				},
				i = function(e, t) {
					var n = a(e).replace(r, ""),
						o = n.length;
					return "undefined" == typeof t && (t = o), t = Math.floor(t), 0 > t && (t = o + t), 0 > t && (t = 0), t > o && (t = o), t
				},
				c = function(e, t) {
					return e.hasAttribute ? e.hasAttribute(t) : "undefined" != typeof e[t]
				},
				u = function(e, t, n, r) {
					this.start = e || 0, this.end = t || 0, this.length = n || 0, this.text = r || ""
				};
			u.prototype.toString = function() {
				return JSON.stringify(this, null, "    ")
			};
			var s = function(e) {
					return e.selectionStart
				},
				l = function(e) {
					var t, r, o, i, c, u;
					return e.focus(), e.focus(), r = document.selection.createRange(), r && r.parentElement() === e ? (i = a(e), c = i.length, o = e.createTextRange(), o.moveToBookmark(r.getBookmark()), u = e.createTextRange(), u.collapse(!1), t = o.compareEndPoints("StartToEnd", u) > -1 ? i.replace(n, "\n").length : -o.moveStart("character", -c)) : 0
				},
				g = function(e) {
					return e ? t.setSelectionRange ? s(e) : t.createTextRange ? l(e) : void 0 : void 0
				},
				f = function(e, t) {
					e.setSelectionRange(t, t)
				},
				d = function(e, t) {
					var n = e.createTextRange();
					n.move("character", t), n.select()
				},
				h = function(e, n) {
					e.focus(), n = i(e, n), t.setSelectionRange ? f(e, n) : t.createTextRange && d(e, n)
				},
				v = function(e, t) {
					var n = g(e),
						i = a(e).replace(r, ""),
						u = +(n + t.length + (i.length - n)),
						s = +e.getAttribute("maxlength");
					if(c(e, "maxlength") && u > s) {
						var l = t.length - (u - s);
						t = t.substr(0, l)
					}
					o(e, i.substr(0, n) + t + i.substr(n)), h(e, n + t.length)
				},
				m = function(e) {
					var t = new u;
					t.start = e.selectionStart, t.end = e.selectionEnd;
					var n = Math.min(t.start, t.end),
						r = Math.max(t.start, t.end);
					return t.length = r - n, t.text = a(e).substring(n, r), t
				},
				x = function(e) {
					var t = new u;
					e.focus();
					var n = document.selection.createRange();
					if(n && n.parentElement() === e) {
						var r, o, i, c, s = 0,
							l = 0,
							g = a(e);
						r = g.length, o = g.replace(/\r\n/g, "\n"), i = e.createTextRange(), i.moveToBookmark(n.getBookmark()), c = e.createTextRange(), c.collapse(!1), i.compareEndPoints("StartToEnd", c) > -1 ? s = l = r : (s = -i.moveStart("character", -r), s += o.slice(0, s).split("\n").length - 1, i.compareEndPoints("EndToEnd", c) > -1 ? l = r : (l = -i.moveEnd("character", -r), l += o.slice(0, l).split("\n").length - 1)), s -= g.substring(0, s).split("\r\n").length - 1, l -= g.substring(0, l).split("\r\n").length - 1, t.start = s, t.end = l, t.length = t.end - t.start, t.text = o.substr(t.start, t.length)
					}
					return t
				},
				p = function(e) {
					return e ? t.setSelectionRange ? m(e) : t.createTextRange ? x(e) : void 0 : void 0
				},
				R = function(e, t, n) {
					e.setSelectionRange(t, n)
				},
				S = function(e, t, n) {
					var r = e.createTextRange();
					r.moveEnd("textedit", -1), r.moveStart("character", t), r.moveEnd("character", n - t), r.select()
				},
				T = function(e, n, r) {
					n = i(e, n), r = i(e, r), t.setSelectionRange ? R(e, n, r) : t.createTextRange && S(e, n, r)
				},
				b = function(e, t) {
					var n = $(e),
						r = n.val(),
						a = p(e),
						o = +(a.start + t.length + (r.length - a.end)),
						i = +n.attr("maxlength");
					if(n.is("[maxlength]") && o > i) {
						var c = t.length - (o - i);
						t = t.substr(0, c)
					}
					var u = r.substr(0, a.start),
						s = r.substr(a.end);
					n.val(u + t + s);
					var l = a.start,
						g = l + t.length;
					T(e, a.length ? l : g, g)
				},
				E = function(e) {
					var t = window.getSelection(),
						n = document.createRange();
					n.selectNodeContents(e), t.removeAllRanges(), t.addRange(n)
				},
				y = function(e) {
					var t = document.body.createTextRange();
					t.moveToElementText(e), t.select()
				},
				w = function(e) {
					var n = $(e);
					return n.is("input, textarea") || e.select ? (n.select(), void 0) : (t.setSelectionRange ? E(e) : t.createTextRange && y(e), void 0)
				},
				k = function() {
					document.selection ? document.selection.empty() : window.getSelection && window.getSelection().removeAllRanges()
				};
			$.extend($.fn, {
				caret: function() {
					var e = this.filter("input, textarea");
					if(0 === arguments.length) {
						var t = e.get(0);
						return g(t)
					}
					if("number" == typeof arguments[0]) {
						var n = arguments[0];
						e.each(function(e, t) {
							h(t, n)
						})
					} else {
						var r = arguments[0];
						e.each(function(e, t) {
							v(t, r)
						})
					}
					return this
				},
				range: function() {
					var e = this.filter("input, textarea");
					if(0 === arguments.length) {
						var t = e.get(0);
						return p(t)
					}
					if("number" == typeof arguments[0]) {
						var n = arguments[0],
							r = arguments[1];
						e.each(function(e, t) {
							T(t, n, r)
						})
					} else {
						var a = arguments[0];
						e.each(function(e, t) {
							b(t, a)
						})
					}
					return this
				},
				selectAll: function() {
					return this.each(function(e, t) {
						w(t)
					})
				}
			}), $.extend($, {
				deselectAll: function() {
					return k(), this
				}
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/ueditor_topic",
	sub: {
		$container: null,
		initial: function(i) {
			function t(i, t) {
				for(var c = "", n = 0; n < i.length; n++) c = c + '<li class="topic_item"><span class="topic_name">' + i[n].topic_name + "</span></li>";
				for(var a = "", n = 0; n < t.length; n++) a = 3 > n ? a + '<li class="topic_item"><span class="topic_flag_hot">' + (n + 1) + '</span><span class="topic_name">' + t[n].topic_name + '</span><span class="topic_num">' + t[n].discuss_num + "</span></li>" : a + '<li class="topic_item"><span class="topic_flag">' + (n + 1) + '</span><span class="topic_name">' + t[n].topic_name + '</span><span class="topic_num">' + t[n].discuss_num + "</span></li>";
				var o = '<div class="topic_list_box"><div class="topic_list_title">\u5e38\u7528\u70ed\u8bae\u8bdd\u9898</div><ul class="topic_list_common topic_list"></ul></div>',
					p = '<div class="topic_list_box"><div class="topic_list_title">\u70ed\u8bae\u699c\u5355</div><ul class="topic_list_hot topic_list"></ul></div>',
					l = i.length ? o + p : "" + p;
				s.$container.find(".topic_loading").remove(), s.$container.append(l), s.$container.find(".topic_list_common").append(c), s.$container.find(".topic_list_hot").append(a), s.$container.find(".topic_item").on("click", function() {
					var i = "#" + $(this).find(".topic_name").text() + "#";
					s.trigger("inserttopic", i)
				})
			}
			this.$container = i.container;
			var s = this,
				c = '<div class="topic_header"><a href="#">#\u63d2\u5165\u6211\u7684\u65b0\u8bdd\u9898#</a></div><div class="topic_loading">\u8bdd\u9898\u52a0\u8f7d\u4e2d...</div>';
			this.$container.append(c), this.$container.find(".topic_header").click(function(i) {
				i.preventDefault(), s.trigger("insertcustomtopic")
			}), $.ajax({
				type: "POST",
				url: "/hottopic/browse/topicList",
				data: {}
			}).done(function(i) {
				var s = i.data.user_his_topic.topic_list.slice(0, 3),
					c = i.data.bang_topic.topic_list.slice(0, 10);
				t(s, c)
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/topic",
	requires: ["ueditor/widget/ueditor_topic"],
	sub: {
		initial: function(i, t) {
			i = i || window.UE, t = t || window.EditorUI, this.initPlugin(i, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(i, t, this)
		},
		initPlugin: function() {},
		initLayer: function(i, t) {
			i.registerLayer("topic", function(i) {
				var e = '<div class="topic_container"></div>',
					n = $(e),
					o = $.eduipopup().on("beforeshow", function() {
						if(!i.getValue("UeditorTopic")) {
							var e = o.edui().getBodyContainer();
							e.html(""), e.append(n);
							var r = t.requireInstance("ueditor/widget/ueditor_topic", [{
								container: n
							}]);
							i.setValue("UeditorTopic", r), r.bind("inserttopic", function(t, e) {
								i.trigger("inserttopic", e)
							}), r.bind("insertcustomtopic", function() {
								i.trigger("insertcustomtopic")
							})
						}
						$.browser.msie && 6 == $.browser.version && $("#tb_rich_poster").find(".j_sign_id").hide()
					});
				return $.browser.msie && 6 == $.browser.version && o.on("afterhide", function() {
					$("#tb_rich_poster").find(".j_sign_id").show()
				}), i.setWidget(o), o
			})
		},
		initModel: function(i) {
			i.registerModel("topic", function() {
				var t = new i.EditorModel;
				i.bindLayer("topic", t);
				var e = $.eduibutton({
					icon: "topic",
					title: "\u9009\u62e9\u8bdd\u9898"
				});
				return t.setButton(e), t
			})
		},
		initAdapter: function(i, t) {
			i.registerUI("topic", function(i) {
				var e = this,
					n = t.getModel(i),
					o = n.getButton(),
					r = n.getWidget();
				return o.click(function() {
					r.parent().length || e.$container.find(".edui-dialog-container").append(r), r.css("zIndex", e.options.zIndex + 1).edui().show(o, {
						offsetTop: -10,
						offsetLeft: 110,
						caretLeft: 130,
						caretTop: -8
					}), n.trigger("aftershow"), $.stats.track("\u8bdd\u9898\u5feb\u6377\u5f39\u7a97:\u5185\u5bb9\u5904\u5f39\u7a97", "\u5427\u53cb\u70ed\u8bae", "frs", "click", {
						client_type: "pc_web"
					})
				}), r.edui().register("click", r, function(i) {
					o[0] === i.target || $.contains(o[0], i.target) || r.edui().hide()
				}), n.bind("inserttopic", function(i, t) {
					e.execCommand("inserthtml", t), r.hide()
				}), n.bind("insertcustomtopic", function() {
					var i = $("<span>#</span>")[0],
						t = $("<span>#</span>")[0],
						n = e.selection.getRange();
					n.insertNode(t), n.insertNode(i), n.setStartAfter(i), n.setEndAfter(i), n.setCursor(), e.focus(), r.hide()
				}), o
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/topic_suggestion",
	sub: {
		initial: function(t, i) {
			t = t || window.UE, i = i || window.EditorUI, this.initPlugin(t, this), this.initLayer(i, this), this.initModel(i, this), this.initAdapter(t, i, this)
		},
		initPlugin: function(t) {
			t.plugins.topic_suggestion = function() {
				function i(t, i) {
					var e = this;
					this.$root = $("<div class='edui_at_box' style='display: none;'><div class='topic_sug_box_title'>\u6dfb\u52a0\u4ec0\u4e48\u8bdd\u9898?</div><ul class='topic_list_sug'></ul></div>").appendTo(t), this.$list = this.$root.children("ul"), this.$list.on({
						mouseenter: function() {
							e.setFocus(this)
						},
						click: function() {
							e.hide(), i(e.getValue())
						}
					}, "li"), this.shown = !1
				}

				function e(t) {
					var i = t.selection.getRange();
					if(i.collapsed) {
						var e = $("<span class='topic_suggestion'>#</span>")[0];
						i.setStart(i.startContainer, i.startOffset - 1).select().deleteContents().insertNode(e).setStart(e, 1).collapse(!0).select(), t.topicBox.show(e), t.topicBox.loadSuggestion()
					}
				}

				function s(i) {
					var e = o.selection.getRange(),
						s = o.selection.getStart(),
						n = t.dom.domUtils.findParent(s, function(t) {
							return $(t).is(".topic_suggestion") && "SPAN" == t.tagName
						}, !0);
					e.setStartAfter(n).collapse(!0).select(), o.execCommand("inserthtml", "#" + i + "#"), t.dom.domUtils.remove(n)
				}
				var o = this;
				i.prototype = {
					loadSuggestion: function(t) {
						var i, e = this;
						void 0 == t && (t = ""), $.browser.msie && (t = t.replace(decodeURIComponent("%E2%80%8B"), "")), $.ajax({
							type: "GET",
							url: "/hottopic/browse/topicList?prefix=" + t
						}).done(function(s) {
							i = "" == t ? s.data.bang_topic.topic_list.slice(0, 8) : s.data.sug_topic.topic_list.slice(0, 5);
							for(var o = i.length, n = "", c = 0; o > c; c++) n = n + "<li>" + i[c].topic_name + "</li>";
							e.$list.html(n), e.first()
						})
					},
					clearList: function() {
						this.$list.html("")
					},
					isShown: function(t) {
						return t ? this.shown && this.target == t : this.shown
					},
					show: function(t) {
						t != this.target && this.clearList(), this.target = t, this.shown = !0;
						var i = $(t).position();
						this.$root.css({
							left: i.left,
							top: i.top + 16
						}).show()
					},
					hide: function() {
						this.$root.hide(), this.shown = !1
					},
					first: function() {
						this.setFocus(this.$list.children(":first"))
					},
					last: function() {
						this.setFocus(this.$list.children(":last"))
					},
					next: function() {
						var t = this.$list.children(".focus");
						0 == t.size() ? this.first() : t.index() == this.$list.children().size() - 1 ? this.first() : this.setFocus(t.next())
					},
					prev: function() {
						var t = this.$list.children(".focus");
						0 == t.size() ? this.last() : 0 == t.index() ? this.last() : this.setFocus(t.prev())
					},
					setFocus: function(t) {
						$(t).siblings(".focus").removeClass("focus").end().addClass("focus")
					},
					getValue: function() {
						var t = this.$list.find(".focus").text();
						return t
					}
				};
				var n = !1,
					c = null;
				o.addListener("ready", function() {
					o.topicBox = new i(o.$body.parent(), s)
				}), o.addListener("keydown", function(t, i) {
					if(o.topicBox.isShown()) {
						var e = !1;
						switch(i.keyCode) {
							case 38:
								o.topicBox.prev(), e = !0;
								break;
							case 40:
								o.topicBox.next(), e = !0;
								break;
							case 13:
								var a = o.topicBox.getValue();
								o.topicBox.hide(), s(a), e = !0;
								break;
							case 32:
								o.topicBox.hide()
						}
						if(e) return i.preventDefault && i.preventDefault(), !1
					} else 16 == i.keyCode && (clearTimeout(c), n = !0)
				}), o.addListener("keyup", function(t, i) {
					51 == i.keyCode && n ? e(this) : 16 == i.keyCode && (c = setTimeout(function() {
						n = !1
					}, 100))
				}), o.addListener("contentchange", function() {
					var i = o.selection.getRange();
					if(i.collapsed) {
						var e = o.selection.getStart(),
							s = t.dom.domUtils.findParent(e, function(t) {
								return "topic_suggestion" == t.className
							}, !0);
						s ? this.topicBox.isShown(s) && this.topicBox.loadSuggestion($(s).text().substring(1)) : this.topicBox.isShown() && this.topicBox.hide()
					}
				}), o.getSmileyNum = function() {
					return $(o.body).find(".BDE_Smiley").size()
				}
			}
		},
		initLayer: function() {},
		initModel: function() {},
		initAdapter: function() {}
	}
});
_.Module.define({
	path: "ueditor/widget/fullscreen",
	sub: {
		initial: function(e, t) {
			e = e || window.UE, t = t || window.EditorUI, this.initPlugin(e, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(e, t, this)
		},
		initPlugin: function() {},
		initLayer: function(e) {
			e.registerLayer("fullscreen", function() {})
		},
		initModel: function(e) {
			e.registerModel("fullscreen", function() {
				var t = new e.EditorModel;
				e.bindLayer("fullscreen", t);
				var i = $.eduibutton({
					icon: "fullscreen",
					title: "\u5168\u5c4f"
				});
				return self.$bodywrap && self.$bodywrap.length ? self.$bodywrap : self.$body, t.setButton(i), t
			})
		},
		initAdapter: function(e, t) {
			e.registerUI("fullscreen", function(e) {
				function i() {
					$("html").addClass("tb-ueditor-fullscreen"), a ? r.resize(500, h.fullscreenHeight) : r.resize(708, g.fullscreenHeight), r.disableHeightLimit(), c.trigger("onSetFullScreen")
				}

				function l(e) {
					$("html").removeClass("tb-ueditor-fullscreen"), a ? r.resize(500, h.defaultHeight) : r.resize(708, g.defaultHeight), r.enableHeightLimit(), c.trigger("restored.draft"), c.removeClass("edui-toolbar-fixed"), e || ($("body").scrollTop($("body").outerHeight()), $("html").scrollTop($("body").outerHeight()))
				}

				function n() {
					var e = $(".j_title").val(),
						t = Math.ceil($.tb.getByteLength(e) / 2);
					d.html(t > 30 ? 30 : t), setTimeout(function() {
						n()
					}, 1e3)
				}
				var r = this,
					o = t.getModel(e),
					s = o.getButton(),
					u = !1,
					c = (r.$bodywrap && r.$bodywrap.length ? r.$bodywrap : r.$body, r.$container),
					a = (c.find(".edui-toolbar"), !1),
					d = $(".j-fullscreen-wl"),
					f = $(".j_submit"),
					h = {
						fullscreenWidth: 500,
						defaultWidth: 500,
						fullscreenHeight: 260,
						defaultHeight: 50
					},
					g = {
						fullscreenWidth: 980,
						defaultWidth: 690,
						fullscreenHeight: 350,
						defaultHeight: 220
					};
				return s.click(function() {
					u ? ($.stats.track("\u70b9\u51fb\u5168\u5c4f\u6309\u94ae-\u590d\u539f", "\u65b0\u53d1\u8d34\u4f18\u5316\u7edf\u8ba1", "frs", "click"), f.data("fullscreen", "\u9ed8\u8ba4"), l()) : ($.stats.track("\u70b9\u51fb\u5168\u5c4f\u6309\u94ae-\u5168\u5c4f", "\u65b0\u53d1\u8d34\u4f18\u5316\u7edf\u8ba1", "frs", "click"), f.data("fullscreen", "\u5168\u5c4f"), i()), u = !u, $.stats.track("fullscreen_btn", "ueditor")
				}), $("#tb_rich_poster_container").on("scroll", function(e) {
					if(u) {
						var t = e.target.scrollTop;
						t > 125 ? c.addClass("edui-toolbar-fixed") : c.removeClass("edui-toolbar-fixed")
					}
				}), c.on("setbackground", function(e, t) {
					a = "bubble" === t
				}), $(".j_clear_fullscreen").on("click", function() {
					l(), r.focus()
				}), r.commands.clearfullscreen = {
					execCommand: function() {
						u && l(!0)
					}
				}, n(), r.ready(function() {
					var e = $(".j_title"),
						t = e.val(),
						i = Math.ceil($.tb.getByteLength(t) / 2);
					d.html(i > 30 ? 30 : i)
				}), o.getButton()
			})
		}
	}
});
_.Module.define({
	path: "ueditor/widget/height_limit",
	sub: {
		initial: function(i, t) {
			i = i || window.UE, t = t || window.EditorUI, this.initPlugin(i, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(i, t, this)
		},
		initPlugin: function(i) {
			i.plugins.height_limit = function() {
				function i() {
					if(e) {
						var i = d.$bodywrap && d.$bodywrap.length ? d.$bodywrap : d.$body,
							n = i[0].scrollHeight;
						!h && n >= o ? (i.css({
							height: o,
							overflowY: "auto",
							overflowX: "hidden"
						}), h = !0) : h && o >= n && t()
					}
				}

				function t() {
					var i = d.$bodywrap && d.$bodywrap.length ? d.$bodywrap : d.$body;
					i.css({
						height: "auto"
					}), h = !1
				}
				var n = $(window).height() - 250,
					o = n,
					e = !0,
					h = !1,
					d = this;
				this.disableHeightLimit = function() {
					e = !1, h = !1, t()
				}, this.enableHeightLimit = function(i) {
					o = i || n, e = !0;
					var s = d.$bodywrap && d.$bodywrap.length ? d.$bodywrap : d.$body,
						a = s.scrollHeight;
					a >= o ? (s.css({
						height: o
					}), h = !0) : o >= a && t()
				}, this.addListener("contentchange afterinserthtml keyup mouseup", function() {
					i()
				}), this.ready(function() {
					this.enableHeightLimit(d.options.maxHeight), d.options.heightLimit === !1 && (e = !1), d.$container.on("restored.draft", function() {
						setTimeout(i, 1e3)
					})
				})
			}
		},
		initLayer: function() {},
		initModel: function() {},
		initAdapter: function() {}
	}
});
_.Module.define({
	path: "ueditor/widget/draft",
	sub: {
		initial: function(t, i) {
			t = t || window.UE, i = i || window.EditorUI, this.initPlugin(t, this), this.initLayer(i, this), this.initModel(i, this), this.initAdapter(t, i, this)
		},
		initPlugin: function(t) {
			t.plugins.draft = function() {
				var t = this;
				if($.tb.Storage.isSupport()) {
					var i = PosterContext.getContext(),
						r = ["draft-" + this.uid, i.user.id, i.forum.id, i.thread ? i.thread.id : 0].join("-"),
						e = ["draft-" + this.uid, "", i.forum.id, i.thread ? i.thread.id : 0].join("-"),
						n = ["draft", i.user.id, i.forum.id, i.thread ? i.thread.id : 0].join("-"),
						o = (["draft", "", i.forum.id, i.thread ? i.thread.id : 0].join("-"), $.tb.throttle(function(i, r) {
							$.tb.Storage.set(i, r), t.$container.trigger("saved.draft")
						}, 2e3));
					this.addListener("contentchange", function() {
						o(r, this.body.innerHTML)
					}), this.restoreDraft = function() {
						var t = $.tb.Storage.get(r);
						t || (t = $.tb.Storage.get(e)), t || (t = $.tb.Storage.get(n)), t && "<p><br></p>" != t && "<P>&nbsp;</P>" != t && (this.body.innerHTML = t, this.$container.trigger("restored.draft"))
					}, this.clearDraft = function() {
						$.tb.Storage.remove(r), $.tb.Storage.remove(e)
					}
				} else this.clearDraft = function() {}
			}
		},
		initLayer: function() {},
		initModel: function() {},
		initAdapter: function() {}
	}
});
_.Module.define({
	path: "ueditor/widget/at",
	sub: {
		initial: function(t, i) {
			t = t || window.UE, i = i || window.EditorUI, this.initPlugin(t, this), this.initLayer(i, this), this.initModel(i, this), this.initAdapter(t, i, this)
		},
		initPlugin: function(t) {
			t.plugins.at = function() {
				function i(t, i) {
					var e = this;
					this.$root = $("<div class='edui_at_box' style='display: none;'><div class='at_box_title'>\u60f3\u7528@\u63d0\u5230\u8c01\uff1f</div><ul></ul></div>").appendTo(t), this.$list = this.$root.children("ul"), this.$list.on({
						mouseenter: function() {
							e.setFocus(this)
						},
						click: function() {
							var t = $(this).text();
							e.hide(), i(t)
						}
					}, "li"), this.shown = !1
				}

				function e(t) {
					var i = t.selection.getRange();
					if(i.collapsed) {
						var e = $("<span class='at'>@</span>")[0];
						i.setStart(i.startContainer, i.startOffset - 1).select().deleteContents().insertNode(e).setStart(e, 1).collapse(!0).select(), t.atBox.show(e)
					}
				}

				function s(i) {
					var e = n.selection.getRange(),
						s = n.selection.getStart(),
						o = t.dom.domUtils.findParent(s, function(t) {
							return $(t).is(".at") && "SPAN" == t.tagName
						}, !0);
					o && null != i && i.length > 0 && (o.innerHTML = "@" + i), e.setStartAfter(o).collapse(!0).select(), n.execCommand("inserthtml", "&nbsp;")
				}
				var n = this;
				i.prototype = {
					loadSuggestion: function(t) {
						var i = this;
						$.get("/at-sug", {
							query: t,
							uid: PosterContext.getContext().user.id,
							ie: "utf-8"
						}, function(t) {
							if(0 == t.error) {
								for(var e, s = [], n = 0; e = t.msg[n]; n++) s.push("<li>"), s.push(e), s.push("</li>");
								i.$list.html("").append(s.join(""))
							}
						}, "json")
					},
					clearList: function() {
						this.$list.html("")
					},
					isShown: function(t) {
						return t ? this.shown && this.target == t : this.shown
					},
					show: function(t) {
						t != this.target && this.clearList(), this.target = t, this.shown = !0;
						var i = $(t).position();
						this.$root.css({
							left: i.left,
							top: i.top + 16
						}).show()
					},
					hide: function() {
						this.$root.hide(), this.shown = !1
					},
					first: function() {
						this.setFocus(this.$list.children(":first"))
					},
					last: function() {
						this.setFocus(this.$list.children(":last"))
					},
					next: function() {
						var t = this.$list.children(".focus");
						0 == t.size() ? this.first() : t.index() == this.$list.children().size() - 1 ? this.first() : this.setFocus(t.next())
					},
					prev: function() {
						var t = this.$list.children(".focus");
						0 == t.size() ? this.last() : 0 == t.index() ? this.last() : this.setFocus(t.prev())
					},
					setFocus: function(t) {
						$(t).siblings(".focus").removeClass("focus").end().addClass("focus")
					},
					getValue: function() {
						return this.$list.find(".focus").text()
					}
				}, n.addListener("ready", function() {
					n.atBox = new i(n.$body.parent(), s)
				}), n.addListener("keydown", function(t, i) {
					if(n.atBox.isShown()) {
						switch(i.keyCode) {
							case 38:
								n.atBox.prev();
								break;
							case 40:
								n.atBox.next();
								break;
							case 13:
								var e = n.atBox.getValue();
								n.atBox.hide(), s(e);
								break;
							case 32:
								s(null);
								break;
							default:
								return
						}
						return i.preventDefault && i.preventDefault(), !1
					}
				}), n.addListener("keyup", function(i, s) {
					if(50 == s.keyCode && s.shiftKey) e(this);
					else if(this.atBox.isShown() && -1 == $.inArray(s.keyCode, [38, 40, 13, 32])) {
						var n = t.dom.domUtils.findParent(this.selection.getStart(), function(t) {
								return "at" == t.className
							}, !0),
							o = $(n).text().substring(1);
						o.length > 0 && this.atBox.loadSuggestion(o)
					}
				}), n.addListener("selectionchange", function() {
					var i = n.selection.getRange();
					if(i.collapsed) {
						var e = n.selection.getStart(),
							s = t.dom.domUtils.findParent(e, function(t) {
								return "at" == t.className
							}, !0);
						s ? this.atBox.isShown(s) || (this.atBox.show(s), this.atBox.loadSuggestion($(s).text().substring(1))) : this.atBox.isShown() && this.atBox.hide()
					}
				}), this.addOutputRule(function(i) {
					$.each(i.getNodesByTagName("span"), function(i, e) {
						var s = e.getAttr("class");
						if("at" == s) {
							var n = e.innerText(),
								o = t.uNode.createText(n),
								a = e.parentNode;
							a.insertBefore(o, e), a.removeChild(e)
						}
					})
				}, !0)
			}
		},
		initLayer: function() {},
		initModel: function() {},
		initAdapter: function() {}
	}
});
_.Module.define({
	path: "ueditor/widget/counter",
	sub: {
		initial: function(i, t) {
			i = i || window.UE, t = t || window.EditorUI, this.initPlugin(i, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(i, t, this)
		},
		initPlugin: function(i) {
			i.plugins.counter = function() {
				function i(i) {
					return i.replace(/[^\x00-\xff]/g, "mm").length
				}
				var t = this;
				t.getContentByteLength = function() {
					return i(t.getContent())
				}
			}
		},
		initLayer: function() {},
		initModel: function() {},
		initAdapter: function() {}
	}
});
_.Module.define({
	path: "ueditor/widget/word_limit",
	sub: {
		initial: function(e, t) {
			e = e || window.UE, t = t || window.EditorUI, this.initPlugin(e, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(e, t, this)
		},
		initPlugin: function(e) {
			e.plugins.word_limit = function() {
				var e = 10,
					t = null,
					i = 300,
					n = !1,
					o = !1,
					r = this;
				r.maxNum = 140, r.maxWordNumType = "HalfAsciiCode", r.ready(function() {
					r.options.maxWordNum && (r.maxNum = r.options.maxWordNum, r.maxWordNumType = r.options.maxWordNumType ? r.options.maxWordNumType : r.maxWordNumType, r.creatHolder(), r.container.appendChild(r.holder), r.addListener("keyup", r.handlerEvent, r), r.addListener("focus", r.handlerEvent, r), r.checkWordNum())
				}), r.creatHolder = function() {
					var e = document.createElement("div");
					e.className = "wordlimit-holder", e.style.visibility = "hidden", r.holder = e
				}, r.handlerEvent = function() {
					clearTimeout(t), t = setTimeout(function() {
						r.checkWordNum()
					}, i)
				}, r.getContentByteLength = function(e) {
					e = (e || []).concat(["br", "img"]), count = "NormalAsciiCodeLen" == r.maxWordNumType ? 2 * this.getContentTxt().replace(/[\t\r\n]+/g, "").length : this.getContentTxt().replace(/[\t\r\n]+/g, "").replace(/[^\x00-\xff]/g, "mm").length;
					for(var t, i = 0; t = e[i++];) {
						switch(t) {
							case "br":
								count += this.body.getElementsByTagName(t).length;
								continue;
							case "img":
						}
						count += 2 * this.body.getElementsByTagName(t).length
					}
					return count
				}, r.checkWordNum = function() {
					var t = r.maxNum - Math.ceil(r.getContentByteLength() / 2);
					e >= t ? (r.holder.style.visibility = "visible", n = !0, 0 > t ? (o || (r.fireEvent("overflow"), o = !0), r.holder.innerHTML = '\u5df2\u7ecf\u8d85\u51fa<span style="font-size:18px;font-family:Arial;color:#f00;">' + -t + "</span>\u4e2a\u5b57") : (o && (r.fireEvent("unoverflow"), r.exceed = !1), r.holder.innerHTML = '\u8fd8\u80fd\u8f93\u5165<span style="font-size:18px;font-family:Arial;">' + t + "</span>\u4e2a\u5b57")) : n && (r.holder.style.visibility = "hidden", n = !1, o && (r.fireEvent("unoverflow"), o = !1))
				}
			}
		},
		initLayer: function() {},
		initModel: function() {},
		initAdapter: function() {}
	}
});
_.Module.define({
	path: "encourage-member/widget/join_vip_dialog",
	requires: ["tbui/widget/login_dialog", "encourage-payment/widget/pay_member"],
	sub: {
		objGet: function(e, i, t) {
			t = void 0 === t ? null : t, i = i.split(".");
			var o, n = e;
			for(o in i) {
				if(!("object" == typeof n && i[o] in n)) return t;
				n = n[i[o]]
			}
			return n
		},
		objSet: function(e, i, t) {
			return e[i] = t, e
		},
		initial: function(e) {
			this.options = $.extend({}, e)
		},
		getMemberDialog: function(e, i) {
			return this.objGet(window, "PageData.user.is_login", !1) ? (this.gotoCashier(e, i), !1) : (this.requireInstance("tbui/widget/login_dialog"), !1)
		},
		gotoCashier: function(e, i) {
			var t = this,
				o = this.requireInstance("encourage-payment/widget/pay_member", {
					scores: t.options.scores,
					level: t.options.level
				}),
				n = this.objSet({}, "fr", e || "\u8d2d\u4e70\u4f1a\u5458");
			n = this.objSet(n, "scene_id", i || 0), o.showCashier(n)
		}
	}
});
! function() {
	function t() {
		this._api = {
			getProps: "/tbmall/get/userProps"
		}
	}
	var e = null,
		n = {};
	t.prototype = {
		getProps: function(t, e, i) {
			if(arguments.length < 2) throw "At least 2 arguments needed";
			"undefined" == typeof i ? (i = e, e = !0) : e = !!e, e && n[t] ? i(n[t]) : $.get(this._api.getProps, {
				category: t,
				t: (new Date).getTime()
			}, function(e) {
				n[t] = e.data[t] || {}, i(n[t])
			})
		}
	}, _.Module.define({
		path: "encourage-base/widget/props_data",
		sub: {
			initial: function() {},
			getInstance: function() {
				return null === e && (e = new t), e
			}
		}
	})
}(window);
_.Module.define({
	path: "encourage-thread/widget/bubble_factory",
	requires: ["encourage-base/widget/props_data"],
	sub: {
		_curPropId: 0,
		_bubbleDefaultProp: null,
		_list: [{
			id: 0,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/nobubble.png",
			name: "\u4e0d\u4f7f\u7528\u6c14\u6ce1",
			type: 0
		}, {
			id: 1010034,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jintianzhangzheyang.jpg",
			name: "\u4eca\u5929\u957f\u8fd9\u6837",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jintianzhangzheyang_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/jintianzhangzheyang_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jintianzhangzheyang_03.png",
				topHeight: "22",
				bottomHeight: "105"
			}
		}, {
			id: 1010033,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/woxiangjingjing.jpg",
			name: "\u6211\u60f3\u9759\u9759",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/woxiangjingjing_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/woxiangjingjing_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/woxiangjingjing_03.png",
				topHeight: "22",
				bottomHeight: "105"
			}
		}, {
			id: 1010032,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/ranbingluan.jpg",
			name: "\u7136\u5e76\u5375",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/ranbingluan_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/ranbingluan_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/ranbingluan_03.png",
				topHeight: "22",
				bottomHeight: "105"
			}
		}, {
			id: 1010031,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jiji.jpg",
			name: "\u6324\u6324",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jiji_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/jiji_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jiji_03.png",
				topHeight: "22",
				bottomHeight: "105"
			}
		}, {
			id: 1010030,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/qianpai.jpg",
			name: "\u524d\u6392",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/qianpai_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/qianpai_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/qianpai_03.png",
				topHeight: "22",
				bottomHeight: "105"
			}
		}, {
			id: 1010020,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xionghaizhi.jpg",
			name: "\u5c0f\u718a\u5f00\u5b66",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xionghaizhi_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/xionghaizhi_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xionghaizhi_03.png",
				topHeight: "11",
				bottomHeight: "108"
			}
		}, {
			id: 1010019,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/piaoliupings.jpg",
			name: "\u6f02\u6d41\u74f6",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/piaoliuping_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/piaoliuping_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/piaoliuping_3.png",
				topHeight: "110",
				bottomHeight: "34"
			}
		}, {
			id: 1010016,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/panpasis.jpg",
			name: "\u6f58\u5e15\u65af\u4e4b\u9e70",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/panpasi_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/panpasi_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/panpasi_3.png",
				topHeight: "54",
				bottomHeight: "91"
			}
		}, {
			id: 1010015,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/riermans.jpg",
			name: "\u65e5\u8033\u66fc\u6218\u8f66",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/rierman_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/rierman_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/rierman_3.png",
				topHeight: "50",
				bottomHeight: "65"
			}
		}, {
			id: 1010014,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/caoshangyingfeis.jpg",
			name: "\u8349\u957f\u83ba\u98de",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/caoshangyingfei_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/caoshangyingfei_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/caoshangyingfei_3.png",
				topHeight: "61",
				bottomHeight: "58"
			}
		}, {
			id: 1010012,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xingnis.jpg",
			name: "\u6765\u81ea\u661f\u661f\u7684\u4f60",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xingni_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/xingni_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xingni_3.png",
				topHeight: "35",
				bottomHeight: "67"
			}
		}, {
			id: 1010011,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/qingrens.jpg",
			name: "\u4e18\u6bd4\u7279",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/qingren_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/qingren_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/qingren_3.png",
				topHeight: "60",
				bottomHeight: "66"
			}
		}, {
			id: 1010010,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/chunjies.jpg",
			name: "\u6b22\u5ea6\u6625\u8282",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/chunjie_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/chunjie_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/chunjie_3.png",
				topHeight: "35",
				bottomHeight: "68"
			}
		}, {
			id: 1010007,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yuandans.jpg",
			name: "\u559c\u5e86\u5143\u65e6",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yuandan_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/yuandan_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yuandan_03.png",
				topHeight: "24",
				bottomHeight: "56"
			}
		}, {
			id: 1010006,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shengdans.jpg",
			name: "\u5feb\u4e50\u5723\u8bde",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shengdian_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/shengdan_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shengdan_3.png",
				topHeight: "26",
				bottomHeight: "72"
			}
		}, {
			id: 1010005,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangyus.jpg",
			name: "\u6ce1\u6fa1\u7ae0\u9c7c",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangyu_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangyu_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangyu_3.png",
				topHeight: "66",
				bottomHeight: "70"
			}
		}, {
			id: 1010004,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/tuhaos.jpg",
			name: "\u94bb\u77f3\u571f\u8c6a\u91d1",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/tuhao_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/tuhao_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/tuhao_3.png",
				topHeight: "37",
				bottomHeight: "42"
			}
		}, {
			id: 1010003,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/dashus.jpg",
			name: "\u5fae\u7b11\u5927\u53d4",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shushu_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/shushu_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shushu_3.png",
				topHeight: "31",
				bottomHeight: "55"
			}
		}, {
			id: 1010002,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/dazuiguais.jpg",
			name: "\u5927\u5634\u602a",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/dazuiguai_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/dazuiguai_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/dazuiguai_3.png",
				topHeight: "78",
				bottomHeight: "34"
			}
		}, {
			id: 1010001,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiaolus.jpg",
			name: "\u773a\u671b\u5c0f\u9e7f",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiaolu_1.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiaolu_2.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiaolu_3.png",
				topHeight: "45",
				bottomHeight: "55"
			}
		}],
		_npcPropsList: [{
			id: 1010101,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/lufei.jpg",
			name: "\u8def\u98de",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/lufei_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/lufei_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/lufei_03.png",
				topHeight: "19",
				bottomHeight: "101"
			}
		}, {
			id: 1010102,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/mingren.jpg",
			name: "\u9e23\u4eba",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/mingren_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/mingren_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/mingren_03.png",
				topHeight: "42",
				bottomHeight: "117"
			}
		}, {
			id: 1010103,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/nazi.jpg",
			name: "\u7eb3\u5179",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/nazi_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/nazi_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/nazi_03.png",
				topHeight: "18",
				bottomHeight: "124"
			}
		}, {
			id: 1010104,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/huangyuge.jpg",
			name: "\u9ec4\u9c7c\u54e5",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/huangyuge_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/huangyuge_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/huangyuge_03.png",
				topHeight: "111",
				bottomHeight: "27"
			}
		}, {
			id: 1010105,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shouwangzhe.jpg",
			name: "\u6212\u8272\u5b88\u671b\u8005",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shouwangzhe_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/shouwangzhe_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/shouwangzhe_03.png",
				topHeight: "25",
				bottomHeight: "60"
			}
		}, {
			id: 1010106,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangqiling.png",
			name: "\u5f20\u8d77\u7075",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangqiling_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangqiling_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zhangqiling_03.png",
				topHeight: "80",
				bottomHeight: "48"
			}
		}, {
			id: 1010107,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/suhuanzhen.png",
			name: "\u7d20\u8fd8\u771f",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/suhuanzhen_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/suhuanzhen_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/suhuanzhen_03.png",
				topHeight: "23",
				bottomHeight: "126"
			}
		}, {
			id: 1010108,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jinmuyan.png",
			name: "\u91d1\u6728\u7814",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jinmuyan_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/jinmuyan_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jinmuyan_03.png",
				topHeight: "53",
				bottomHeight: "87"
			}
		}, {
			id: 1010109,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/heiqiyihu.png",
			name: "\u9ed1\u5d0e\u4e00\u62a4",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/heiqiyihu_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/heiqiyihu_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/heiqiyihu_03.png",
				topHeight: "80",
				bottomHeight: "160"
			}
		}, {
			id: 1010110,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jieluxiaoguanjia.png",
			name: "\u6212\u64b8\u5427\u5c0f\u7ba1\u5bb6",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jieluxiaoguanjia_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/jieluxiaoguanjia_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jieluxiaoguanjia_03.png",
				topHeight: "80",
				bottomHeight: "175"
			}
		}, {
			id: 1010111,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jingtianming.png",
			name: "\u8346\u5929\u660e",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jingtianming_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/jingtianming_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jjingtianming_03.png",
				topHeight: "27",
				bottomHeight: "80"
			}
		}, {
			id: 1010112,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yingsanjiage.png",
			name: "\u82f1\u4e09\u5609\u54e5",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yingsanjiage_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/yingsanjiage_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yingsanjiage_03.png",
				topHeight: "74",
				bottomHeight: "44"
			}
		}, {
			id: 1010113,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/bantianyinshi.png",
			name: "\u5742\u7530\u94f6\u65f6",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/bantianyinshi_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/bantianyinshi_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/bantianyinshi_03.png",
				topHeight: "40",
				bottomHeight: "100"
			}
		}, {
			id: 1010114,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/nuannuan.png",
			name: "\u6696\u6696",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/nuannuan_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/nuannuan_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/nuannuan_03.png",
				topHeight: "18",
				bottomHeight: "124"
			}
		}, {
			id: 1010115,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/heisikong.png",
			name: "\u9ed1\u4e1d\u63a7",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/heisikong_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/heisikong_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/heisikong_03.png",
				topHeight: "20",
				bottomHeight: "120"
			}
		}, {
			id: 1010116,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/huiyuanai.png",
			name: "\u7070\u539f\u54c0",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/huiyuanai_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/huiyuanai_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/huiyuanai_03.png",
				topHeight: "49",
				bottomHeight: "111"
			}
		}, {
			id: 1010117,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/dongfangai.png",
			name: "\u4e1c\u65b9\u7231",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/dongfangai_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/dongfangai_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/dongfangai_03.png",
				topHeight: "21",
				bottomHeight: "116"
			}
		}, {
			id: 1010118,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/gaobansuinaiguo.png",
			name: "\u9ad8\u5742\u7a57\u4e43\u679c",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/gaobansuinaiguo_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/gaobansuinaiguo_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/gaobansuinaiguo_03.png",
				topHeight: "17",
				bottomHeight: "118"
			}
		}, {
			id: 1010120,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xierwanasi.jpg",
			name: "\u5e0c\u5c14\u74e6\u5a1c\u65af",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xierwanasi_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/xierwanasi_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xierwanasi_03.png",
				topHeight: "45",
				bottomHeight: "82"
			}
		}, {
			id: 1010121,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/mengbanniang.jpg",
			name: "\u840c\u677f\u5a18",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/mengbanniang_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/mengbanniang_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/mengbanniang_03.png",
				topHeight: "36",
				bottomHeight: "104"
			}
		}, {
			id: 1010122,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jijianhun.jpg",
			name: "\u796d\u5251\u9b42",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jijianhun_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/jijianhun_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/jijianhun_03.png",
				topHeight: "94",
				bottomHeight: "32"
			}
		}, {
			id: 1010123,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/fujianyuanbigu.png",
			name: "\u4f0f\u89c1\u733f\u6bd4\u53e4",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/fujianyuanbigu_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/fujianyuanbigu_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/fujianyuanbigu_03.png",
				topHeight: "32",
				bottomHeight: "137"
			}
		}, {
			id: 1010124,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/gainie.png",
			name: "\u76d6\u8042",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/gainie_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/gainie_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/gainie_03.png",
				topHeight: "37",
				bottomHeight: "119"
			}
		}, {
			id: 1010125,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/maolilan.png",
			name: "\u6bdb\u5229\u5170",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/maolilan_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/maolilan_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/maolilan_03.png",
				topHeight: "30",
				bottomHeight: "103"
			}
		}, {
			id: 1010126,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/wuxie.png",
			name: "\u5434\u90aa",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/wuxie_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/wuxie_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/wuxie_03.png",
				topHeight: "39",
				bottomHeight: "100"
			}
		}, {
			id: 1010127,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiamuguizhi.png",
			name: "\u590f\u76ee\u8d35\u5fd7",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiamuguizhi_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiamuguizhi_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/xiamuguizhi_03.png",
				topHeight: "63",
				bottomHeight: "122"
			}
		}, {
			id: 1010128,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/baoyuxinnu.png",
			name: "\u66b4\u96e8\u5fc3\u5974",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/baoyuxinnu_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/baoyuxinnu_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/baoyuxinnu_03.png",
				topHeight: "45",
				bottomHeight: "33"
			}
		}, {
			id: 1010129,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yefan.png",
			name: "\u53f6\u51e1",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yefan_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/yefan_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/yefan_03.png",
				topHeight: "70",
				bottomHeight: "90"
			}
		}, {
			id: 1010130,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/kiana.png",
			name: "kiana",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/kiana_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/kiana_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/kiana_03.png",
				topHeight: "40",
				bottomHeight: "160"
			}
		}, {
			id: 1010131,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/chuyinmiku.png",
			name: "\u521d\u97f3\u30df\u30af",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/chuyinmiku_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/chuyinmiku_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/chuyinmiku_03.png",
				topHeight: "57",
				bottomHeight: "230"
			}
		}, {
			id: 1010132,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zetiangangji.png",
			name: "\u6ca2\u7530\u7eb2\u5409",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zetiangangji_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/zetiangangji_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/zetiangangji_03.png",
				topHeight: "128",
				bottomHeight: "84"
			}
		}, {
			id: 1010133,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/liuming.png",
			name: "\u67f3\u9e23",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/liuming_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/liuming_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/liuming_03.png",
				topHeight: "21",
				bottomHeight: "110"
			}
		}, {
			id: 1010134,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/menghao.png",
			name: "\u5b5f\u6d69",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/menghao_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/menghao_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/menghao_03.png",
				topHeight: "85",
				bottomHeight: "34"
			}
		}, {
			id: 1010135,
			smallPic: "//tb1.bdstatic.com/tb/cms/post/bubble/wudaodongxiang.png",
			name: "\u96fe\u5c9b\u8463\u9999",
			type: 1,
			background: {
				topPic: "//tb1.bdstatic.com/tb/cms/post/bubble/wudaodongxiang_01.png",
				middlePic: "//tb1.bdstatic.com/tb/cms/post/bubble/wudaodongxiang_02.png",
				bottomPic: "//tb1.bdstatic.com/tb/cms/post/bubble/wudaodongxiang_03.png",
				topHeight: "33",
				bottomHeight: "127"
			}
		}],
		initial: function(t) {
			"object" == typeof t && t.props_id && (this._bubbleDefaultProp = t || {}, this._curPropId = this._bubbleDefaultProp.props_id), this._list = $.map(this._list, function(t) {
				return t.background = t.background || {}, t.background.id = t.id, t
			})
		},
		loadUserPropsData: function(t) {
			var b = this,
				i = this.requireInstance("encourage-base/widget/props_data"),
				c = i.getInstance();
			c.getProps(101, function(i) {
				b._userPropList = i, b._list = $.map(b._list, function(t) {
					return t.isBuy = t.background.isBuy = b.hasUserPower(t.id), t.loseTime = t.isBuy ? b.hasNearLosePower(t.id) : 0, t
				}), b._list = b._list.concat($.map(b._npcPropsList, function(t) {
					var i = b.hasUserPower(t.id);
					if(i) return t.background = t.background || {}, t.background.id = t.id, t.isBuy = t.background.isBuy = i, t.loseTime = t.isBuy ? b.hasNearLosePower(t.id) : 0, t
				})), b._npcPropsList = [], t()
			})
		},
		hasUserPower: function(t) {
			if(0 == t) return !0;
			var b = this.get(t),
				i = this._userPropList[b.id] || {},
				c = 1 * new Date,
				o = (parseInt(1e3 * i.end_time) - c) / 864e5;
			return 0 == b.type ? !0 : i && o > 0 ? !0 : !1
		},
		hasNearLosePower: function(t) {
			var b = this._userPropList[t || 0] || {},
				i = 1 * new Date,
				c = (parseInt(1e3 * b.end_time) - i) / 864e5;
			return b && c > 0 && 2 > c ? parseInt(c + 1) : 0
		},
		get: function(t) {
			return _.filter(this._list.concat(this._npcPropsList), function(b) {
				return b.id == t
			})[0]
		},
		getRandom: function() {
			var t = parseInt(Math.random() * this._list.length);
			return 0 == this._list[t].id || this._list[t].id == this._curPropId ? this.getRandom() : this._list[t].id
		},
		getAll: function() {
			return this._list
		},
		setPropId: function(t) {
			this._curPropId = this.get(t) ? t : this._curPropId, PageData.user.bubble_id = this._curPropId
		},
		getPropId: function() {
			return this._curPropId
		},
		getCurrent: function() {
			if(this._bubbleDefaultProp && this._bubbleDefaultProp.props_id === this._curPropId) {
				var t = $.extend(this.get(this._curPropId), this._bubbleDefaultProp);
				t.background = t.background || {}, t.background.id = t.id, t.isBuy = t.background.isBuy = 1e3 * t.end_time > new Date;
				var b = (parseInt(1e3 * t.end_time) - 1e3 * new Date) / 864e5;
				return t.loseTime = t.isBuy ? b > 0 && 2 > b ? b + 1 : 0 : 0, t
			}
			return this.get(this._curPropId)
		}
	}
});
_.Module.define({
	path: "encourage-thread/widget/post_setting",
	requires: ["encourage-thread/widget/bubble_factory", "encourage-member/widget/join_vip_dialog"],
	sub: {
		_typeList: [{
			type: "bubble",
			name: "\u53d1\u8d34\u6c14\u6ce1",
			submitUrl: "/#"
		}],
		initial: function(t) {
			t = $.extend({}, t); {
				var e = t.type;
				t.forumId
			}
			this.scores = t.userScore, this.level = t.userLevel, this.userLevel = t.level || 0, this.type = this._hasType(e) ? e : "setting", this.bubbleFactory = this.requireInstance("encourage-thread/widget/bubble_factory"), t.noShow || this.show(e)
		},
		loadDialogFlag: 0,
		show: function(t) {
			if(!this._dialog) {
				var e = this;
				0 === this.loadDialogFlag && (this.loadDialogFlag = 1, this.bubbleFactory.loadUserPropsData(function() {
					e.loadDialogFlag = 0, e.type = e._hasType(t) ? t : e.type, e._build(), e.listenEvent()
				}))
			}
		},
		listenEvent: function() {
			var t = this;
			this._root.find(".dialogJclose").click(function(e) {
				e.preventDefault(), t._dialog.close()
			});
			var e = this._root.find(".j_post_setting_frame"),
				s = this._root.find(".j_post_setting_tab");
			this._root.find(".j_post_setting_title").on("click", ".j_post_setting_tab", function(i) {
				i.preventDefault();
				var _ = $(i.currentTarget),
					o = _.tbattr("attr-type");
				t.type = t._hasType(o) ? o : t.type;
				var a = t._root.find(".j_post_setting_frame_" + o);
				s.removeClass("post_setting_tab_select j_post_setting_tab_select"), _.addClass("post_setting_tab_select j_post_setting_tab_select"), e.removeClass("post_setting_frame_show"), a.addClass("post_setting_frame_show")
			}), this._root.on("click", ".j_post_settting_nopower", function(e) {
				e.preventDefault(), t.requireInstance("encourage-member/widget/join_vip_dialog", {
					scores: t.scores,
					level: t.level
				}).getMemberDialog("\u53d1\u5e16\u6c14\u6ce1\u5f00\u901a\u70b9\u51fb2", 1007001002), $.stats.track("\u53d1\u5e16\u6c14\u6ce1", "\u4f1a\u5458\u5065\u5eb7\u7edf\u8ba1", "", "click", {
					obj_name: "\u53d1\u5e16\u6c14\u6ce1\u5f00\u901a\u70b9\u51fb2"
				})
			}), this._root.find(".j_post_setting_submit").click(function(e) {
				e.preventDefault(), t._handleSubmit()
			}), this._root.find(".j_post_setting_cancel").click(function(e) {
				e.preventDefault(), t._dialog.close()
			}), this._dialog.onclose(function() {
				t._dialog = null
			})
		},
		_hasType: function(t) {
			return _.filter(this._typeList, function(e) {
				return e.type === t
			}).length
		},
		_build: function() {
			var t = this._buildHtml();
			this._dialog = new $.dialog({
				html: t,
				showTitle: !1,
				width: 620,
				height: 423,
				modal: !1
			}), this._root = this._dialog.element
		},
		_buildHtml: function() {
			var t = this,
				e = [];
			e.push('<div class="post_setting_wrap">'), e.push('<a href="#" class="dialogJclose" title="\u5173\u95ed\u672c\u7a97\u53e3">&nbsp;</a>'), e.push('<div class="post_setting_title clearfix j_post_setting_title"></div>'), e.push('<div class="post_setting_body j_post_setting_body"></div>'), e.push('<div class="post_setting_operation j_post_setting_operation">'), e.push('<a href="#" class="btn_default btn_middle post_setting_submit j_post_setting_submit">\u786e \u5b9a</a>'), e.push('<a href="#" class="btn_sub btn_middle j_post_setting_cancel">\u53d6 \u6d88</a>'), e.push("</div>"), e.push("</div>");
			var s = $(e.join("")),
				i = [];
			return $.each(this._typeList, function(e, _) {
				var o = "";
				_.type === t.type && (o = "post_setting_tab_select j_post_setting_tab_select"), i.push('<a href="#" attr-type="' + _.type + '" class="post_setting_tab j_post_setting_tab ' + o + '">' + _.name + "</a>"), s.find(".j_post_setting_body").append(t._buildSecondFrame(_.type, _.type === t.type))
			}), s.find(".j_post_setting_title").append(i.join("")), s
		},
		_buildSettingFrame: function() {},
		_buildSecondFrame: function(t, e) {
			var s = this,
				i = {},
				_ = [];
			switch(t) {
				case "bubble":
					i = this.bubbleFactory.getAll()
			}
			var o = [];
			$.each(i, function(t, e) {
				var i = "";
				e.id == s.bubbleFactory.getPropId() && (i = "post_setting_prop_item_select j_post_setting_prop_item_select"), o.push('<div class="post_setting_prop_item j_post_setting_prop_item ' + i + '" attr-id="' + e.id + '">'), o.push('<a onclick="return false" href="#" class="post_setting_prop_item_pic_wrap">'), o.push('<img src="' + e.smallPic + '"/>'), o.push('<div class="post_setting_prop_item_set_default_back"></div>'), o.push('<div class="post_setting_prop_item_set_default">'), o.push('<span class="post_setting_prop_item_set_default_btn j_post_setting_default_btn">\u8bbe\u4e3a\u9ed8\u8ba4</span>'), o.push('<span class="post_setting_prop_item_set_default_suc">\u5df2\u7ecf\u8bbe\u4e3a\u9ed8\u8ba4</span>'), 1 != e.type || e.isBuy || s.userLevel || o.push('<div class="post_setting_prop_item_nopower"><span class="j_post_settting_nopower" href="#">\u5f00\u901a\u4f1a\u5458</span>\u514d\u8d39\u4f7f\u7528</div>'), o.push("</div>"), e.isBuy || o.push('<div class="post_setting_prop_item_power_icon"></div>'), o.push("</a>"), o.push('<div class="post_setting_prop_item_name">'), o.push(e.name), o.push("</div>"), o.push("</div>")
			}), _.push('<div class="post_setting_frame j_post_setting_frame clearfix j_post_setting_frame_' + t + " " + (e ? "post_setting_frame_show" : "") + '">'), _.push(o.join("")), _.push("</div>");
			var a = $(_.join("")),
				n = a.find(".j_post_setting_prop_item");
			return a.on("click", ".j_post_setting_default_btn", function(t) {
				t.preventDefault();
				var e = $(t.currentTarget),
					s = e.closest(".j_post_setting_prop_item");
				n.removeClass("post_setting_prop_item_select j_post_setting_prop_item_select"), s.addClass("post_setting_prop_item_select j_post_setting_prop_item_select")
			}), a
		},
		_handleSubmit: function() {
			var t = $(this._root.find(".j_post_setting_frame_" + this.type).find(".j_post_setting_prop_item_select").get(0)).tbattr("attr-id");
			switch(this.type) {
				case "bubble":
					this.changeBubble(t)
			}
			this._dialog.close()
		},
		changeBubble: function(t) {
			var e = this,
				s = this.bubbleFactory.get(t || 0);
			$.ajax({
				url: "/tbmall/submit/setBub",
				type: "post",
				dataType: "json",
				data: {
					props_id: s.id,
					tbs: PageData.tbs || PageData.user.tbs
				},
				success: function() {
					e.trigger("bubbleset", s), e.bubbleFactory.setPropId(s.id)
				},
				error: function() {
					e.trigger("bubbleset", s), e.bubbleFactory.setPropId(s.id)
				}
			})
		},
		randomBubble: function() {
			var t = this.bubbleFactory.getRandom();
			this.changeBubble(t)
		}
	}
});
_.Module.define({
	path: "encourage-thread/widget/setting",
	requires: ["encourage-member/widget/join_vip_dialog", "encourage-thread/widget/post_setting"],
	sub: {
		initial: function(e, t, n) {
			e = e || window.UE, t = t || window.EditorUI, this.userOptions = $.extend({}, n), this.level = this.userOptions.level || {}, this.scores = this.userOptions.scores || {}, this.initPlugin(e, this), this.initLayer(t, this), this.initModel(t, this), this.initAdapter(e, t, this)
		},
		initPlugin: function(e, t) {
			e.plugins.setting = function() {
				if(window.PosterContext) {
					var e = this,
						n = PosterContext.getContext(),
						i = null,
						o = t.level || {},
						r = o.end_time ? parseInt(1 * new Date / 1e3) > o.end_time ? 0 : o.props_id : 0,
						s = {
							MSG_DEFAULT: "",
							MSG_NOT_MEMBER: '<p><a class="j_get_member" href="#">\u5f00\u901a\u4f1a\u5458</a>\uff0c\u7acb\u5373\u514d\u8d39\u4f7f\u7528\u6240\u6709\u9053\u5177\u3002</p>',
							MSG_NEED_BUY: '<p><a class="post_random_bubble j_random_bubble" href="#">\u6362\u4e00\u6362</a><a class="post_cancel_bubble j_cancel_bubble" href="#">\u53d6\u6d88\u4f7f\u7528</a>\u8be5\u9053\u5177\u9700\u8d2d\u4e70\u624d\u80fd\u4f7f\u7528\uff0c\u53bb<a target="_blank" href="/tbmall/propslist?category=101">\u8d2d\u4e70\u5355\u54c1</a>\u6216<a class="post_get_member j_get_member" href="#">\u5f00\u901a\u4f1a\u5458</a>\u3002',
							MSG_NEAR_LOSE: '<p>\u6709\u6548\u671f\u4e0d\u8db3{#TIME#}\u5929\uff0c\u53bb<a class="j_get_member" href="#">\u7eed\u8d39\u4f1a\u5458</a>\u3002</p>',
							MSG_USE_GUIDE: '<p>\u5c0a\u656c\u7684\u4f1a\u5458\uff0c\u60a8\u53ef\u4f7f\u7528\u53d1\u8d34\u6c14\u6ce1\uff0c<a class="j_open_setting" href="#">\u7acb\u5373\u8bd5\u7528</a>\u3002</p>'
						},
						a = null,
						c = function() {
							return a ? a : (a = e.$container ? e.$container.find(".edui-editor-msg") : null, a && a.on("click", ".j_get_member", function(e) {
								e.preventDefault();
								var n = t.requireInstance("encourage-member/widget/join_vip_dialog", {
									scores: t.userScore,
									level: t.userLevel
								});
								n.getMemberDialog("\u53d1\u5e16\u6c14\u6ce1\u5f00\u901a\u70b9\u51fb1", 1007001001), $.stats.track("\u53d1\u5e16\u6c14\u6ce1", "\u4f1a\u5458\u5065\u5eb7\u7edf\u8ba1", "", "click", {
									obj_name: "\u53d1\u5e16\u6c14\u6ce1\u5f00\u901a\u70b9\u51fb1"
								})
							}).on("click", ".j_cancel_bubble", function(e) {
								e.preventDefault(), i && i.changeBubble()
							}).on("click", ".j_open_setting", function(t) {
								t.preventDefault(), e.execCommand("setting", "bubble"), $.cookie("bubguide", 1, {
									expires: 30
								}), a.html(s.MSG_DEFAULT)
							}).on("click", ".j_random_bubble", function(t) {
								t.preventDefault(), e.execCommand("setting", "bubble", "change")
							}), a)
						},
						u = function(o, r, s) {
							i = t.requireInstance("encourage-thread/widget/post_setting", {
								type: o,
								noShow: r,
								props: n.user.props,
								forumId: n.forum.id,
								level: n.user.memberLevel,
								userScore: t.userOptions.scores,
								userLevel: t.userOptions.level
							}), i.bind("bubbleset", function(t, n) {
								e.execCommand("background", "bubble", n.background), l(n)
							}), "function" == typeof s && s.call(e, i)
						},
						l = function(e) {
							a = c(), e = $.extend({}, e);
							var t = s.MSG_DEFAULT;
							return e.isBuy ? e.loseTime ? t = s.MSG_NEAR_LOSE.replace(/\{#TIME#\}/, e.loseTime) : 0 === r && e.id && (t = s.MSG_NOT_MEMBER) : t = s.MSG_NEED_BUY, a.html(t), t
						},
						b = function(e) {
							return i ? (i.show(e), void 0) : (u(e), void 0)
						},
						_ = function(e) {
							return i ? (i.randomBubble(), void 0) : (u(e, !0, function(e) {
								e.randomBubble()
							}), void 0)
						};
					e.ready(function() {
						u(null, !0, function() {
							a = c()
						})
					}), e.commands.setting = {
						execCommand: function(e, t, n) {
							switch(n = n || "show") {
								case "change":
									_(t);
									break;
								case "show":
									b(t);
									break;
								default:
									b(t)
							}
						}
					}, e.commands.setmsg = {
						execCommand: function(t, n) {
							e.ready(function() {
								a = c(), "string" == typeof n ? a.html(s[n || "MSG_DEFAULT"] || "") : "object" == typeof n && l(n)
							})
						}
					}
				}
			}
		},
		initLayer: function() {},
		initModel: function() {},
		initAdapter: function() {}
	}
});